diff mbox series

[19/34] qla2xxx: Fix abort handling in tcm_qla2xxx_write_pending()

Message ID 20190417214443.243152-20-bvanassche@acm.org (mailing list archive)
State Mainlined
Commit e209783d66bca04b5fce4429e59338517ffc1a0b
Headers show
Series qla2xxx source code cleanup and bug fixes | expand

Commit Message

Bart Van Assche April 17, 2019, 9:44 p.m. UTC
Implementations of the .write_pending() callback functions must guarantee
that an approprite LIO core callback function will be called immediately
or at a later time.  Make sure that this guarantee is met for aborted
SCSI commands.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Fixes: 694833ee00c4 ("scsi: tcm_qla2xxx: Do not allow aborted cmd to advance.") # v4.13.
Fixes: a07100e00ac4 ("qla2xxx: Fix TMR ABORT interaction issue between qla2xxx and TCM") # v4.5.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index eb19ad845bc9..0ef332cfb112 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -394,6 +394,8 @@  static int tcm_qla2xxx_write_pending(struct se_cmd *se_cmd)
 			cmd->se_cmd.transport_state,
 			cmd->se_cmd.t_state,
 			cmd->se_cmd.se_cmd_flags);
+		transport_generic_request_failure(&cmd->se_cmd,
+			TCM_CHECK_CONDITION_ABORT_CMD);
 		return 0;
 	}
 	cmd->trc_flags |= TRC_XFR_RDY;