]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qla2xxx: Simplify the code for aborting SCSI commands
authorBart Van Assche <bvanassche@acm.org>
Thu, 20 Feb 2020 04:34:37 +0000 (20:34 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 29 Feb 2020 00:54:58 +0000 (19:54 -0500)
commit9285eaf726b884bd7de3e4c17046b71896147daa
treec7c385e5527f8ff6a1bc0ce4587973764cf6a6b2
parent94867b10979ac0bcd6f195c5f93a32f8213436c6
scsi: qla2xxx: Simplify the code for aborting SCSI commands

Since the SCSI core does not reuse the tag of the SCSI command that is
being aborted by .eh_abort() before .eh_abort() has finished it is not
necessary to check from inside that callback whether or not the SCSI
command has already completed. Instead, rely on the firmware to return an
error code when attempting to abort a command that has already
completed. Additionally, rely on the firmware to return an error code when
attempting to abort an already aborted command.

In qla2x00_abort_srb(), use blk_mq_request_started() instead of
sp->completed and sp->aborted.

Link: https://lore.kernel.org/r/20200220043441.20504-2-bvanassche@acm.org
Cc: Martin Wilck <mwilck@suse.com>
Cc: Quinn Tran <qutran@marvell.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_os.c