Skip to content

Commit f4199d5

Browse files
abattersbymartinkpetersen
authored andcommitted
scsi: qla2xxx: 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 <tonyb@cybernetics.com> Link: https://patch.msgid.link/d4b0203f-7817-4517-9789-5866bb24fad7@cybernetics.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 091719c commit f4199d5

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/scsi/qla2xxx/qla_target.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4077,6 +4077,10 @@ static void qlt_do_ctio_completion(struct scsi_qla_host *vha,
40774077

40784078
if (cmd->state == QLA_TGT_STATE_PROCESSED) {
40794079
cmd->trc_flags |= TRC_CTIO_DONE;
4080+
4081+
if (likely(status == CTIO_SUCCESS))
4082+
cmd->rsp_sent = 1;
4083+
40804084
} else if (cmd->state == QLA_TGT_STATE_NEED_DATA) {
40814085
cmd->state = QLA_TGT_STATE_DATA_IN;
40824086

drivers/scsi/qla2xxx/qla_target.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,10 @@ struct qla_tgt_cmd {
882882
unsigned int conf_compl_supported:1;
883883
unsigned int sg_mapped:1;
884884
unsigned int write_data_transferred:1;
885+
886+
/* Set if the SCSI status was sent successfully. */
887+
unsigned int rsp_sent:1;
888+
885889
unsigned int q_full:1;
886890
unsigned int term_exchg:1;
887891
unsigned int cmd_sent_to_fw:1;

0 commit comments

Comments
 (0)