From 658dce1cae025dbfd6194e127b488546b93bffc0 Mon Sep 17 00:00:00 2001 From: Tony Battersby Date: Tue, 14 Oct 2025 11:44:52 +0300 Subject: [PATCH] qla2x00t-32gbit: target: Add cmd->rsp_sent Add cmd->rsp_sent to indicate that the SCSI status has been sent successfully, so that SCST can be informed of any transport errors. This will also be used for logging in later patches. Signed-off-by: Tony Battersby Link: https://patch.msgid.link/d4b0203f-7817-4517-9789-5866bb24fad7@cybernetics.com Signed-off-by: Martin K. Petersen [ commit f4199d581256 upstream ] --- qla2x00t-32gbit/qla_target.c | 4 ++++ qla2x00t-32gbit/qla_target.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/qla2x00t-32gbit/qla_target.c b/qla2x00t-32gbit/qla_target.c index 00b53513c..14597c0d3 100644 --- a/qla2x00t-32gbit/qla_target.c +++ b/qla2x00t-32gbit/qla_target.c @@ -4126,6 +4126,10 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha, if (cmd->state == QLA_TGT_STATE_PROCESSED) { cmd->trc_flags |= TRC_CTIO_DONE; + + if (likely(status == CTIO_SUCCESS)) + cmd->rsp_sent = 1; + } else if (cmd->state == QLA_TGT_STATE_NEED_DATA) { cmd->state = QLA_TGT_STATE_DATA_IN; diff --git a/qla2x00t-32gbit/qla_target.h b/qla2x00t-32gbit/qla_target.h index 1eb94456b..ec0835a28 100644 --- a/qla2x00t-32gbit/qla_target.h +++ b/qla2x00t-32gbit/qla_target.h @@ -922,6 +922,10 @@ struct qla_tgt_cmd { unsigned int conf_compl_supported:1; unsigned int sg_mapped:1; unsigned int write_data_transferred:1; + + /* Set if the SCSI status was sent successfully. */ + unsigned int rsp_sent:1; + unsigned int q_full:1; unsigned int term_exchg:1; unsigned int cmd_sent_to_fw:1;