scsi: tcm_qla2xxx: Do not allow aborted cmd to advance.
authorQuinn Tran <quinn.tran@cavium.com>
Fri, 2 Jun 2017 16:11:57 +0000 (09:11 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 00:48:07 +0000 (20:48 -0400)
commit694833ee00c4c56b3fc902515b7685a4186fe502
treee650b3ff0df0bc16c8a4b48a12560593e4787aa2
parent66ee0fece9a0b91f59a7eb8dd39808a0ef5db02b
scsi: tcm_qla2xxx: Do not allow aborted cmd to advance.

In case of hardware queue full, commands can loop between
TCM stack and tcm_qla2xx shim layers for retry. While command
is waiting for retry, task mgmt can get ahead and abort the
cmmand that encountered queue full condition. Fix this by
dropping the command, if task mgmt has already started the
command free process.

Acked-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/tcm_qla2xxx.c