[SCST PATCH v2 13/16] scsi: qla2xxx: add cmd->rsp_sent
From: Tony Battersby
Date: Mon Sep 29 2025 - 10:48:18 EST
This patch applies to the out-of-tree SCST project, not to the Linux
kernel. Apply when importing the upstream patch with the same title.
Signed-off-by: Tony Battersby <tonyb@xxxxxxxxxxxxxxx>
---
v1 -> v2: no changes
qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c
index e5bf210d3..fb5956346 100644
--- a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c
+++ b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c
@@ -685,6 +685,8 @@ static void sqa_qla2xxx_free_cmd(struct qla_tgt_cmd *cmd)
cmd->state = QLA_TGT_STATE_DONE;
cmd->trc_flags |= TRC_CMD_DONE;
+ if (unlikely(!cmd->rsp_sent))
+ scst_set_delivery_status(scst_cmd, SCST_CMD_DELIVERY_FAILED);
scst_tgt_cmd_done(scst_cmd, scst_work_context);
TRACE_EXIT();
--
2.43.0