OSDN Git Service

scsi: qla2xxx: Make sure that aborted commands are freed
authorBart Van Assche <bvanassche@acm.org>
Fri, 9 Aug 2019 03:02:10 +0000 (20:02 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Aug 2019 01:34:08 +0000 (21:34 -0400)
commit0dcec41acb85da33841c2ab56dbf337ed00a3914
treeec7095fbb8cf813c72e7d248f6c195fb491784c2
parentbcc856574356df2eb5eb2d4491e7205339e55728
scsi: qla2xxx: Make sure that aborted commands are freed

The LIO core requires that the target driver callback functions
.queue_data_in() and .queue_status() call target_put_sess_cmd() or
transport_generic_free_cmd(). These calls may happen synchronously or
asynchronously. Make sure that one of these LIO functions is called in case
a command has been aborted. This patch avoids that the code for removing a
session hangs due to commands that do not make progress.

Cc: Himanshu Madhani <hmadhani@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>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_target.c
drivers/scsi/qla2xxx/tcm_qla2xxx.c