scsi: core: No retries on abort success
authorMuneendra Kumar <muneendra.kumar@broadcom.com>
Wed, 6 Jan 2021 21:49:05 +0000 (03:19 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Jan 2021 03:55:17 +0000 (22:55 -0500)
commit60bee27ba2dff82eb921c515e49236abfb6c54ab
tree418d0fb8f24377931995af266190119de710078a
parent962c8dcdd5fa680e2bd68320d54e797b6d8c17fe
scsi: core: No retries on abort success

Add a new optional routine, eh_should_retry_cmd(), in scsi_host_template
that allows the transport to decide if a cmd is retryable. Return true if
the transport is in a state the cmd should be retried on.

Update scmd_eh_abort_handler() and scsi_eh_flush_done_q() to both call
scsi_eh_should_retry_cmd() to check whether the command needs to be
retried.

The above changes were based on a patch by Mike Christie.

Link: https://lore.kernel.org/r/1609969748-17684-3-git-send-email-muneendra.kumar@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Muneendra Kumar <muneendra.kumar@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_error.c
include/scsi/scsi_host.h