scsi: core: Allow passthrough to request midlayer retries
authorMike Christie <michael.christie@oracle.com>
Tue, 23 Jan 2024 00:22:02 +0000 (18:22 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 30 Jan 2024 02:20:53 +0000 (21:20 -0500)
commit994724e6b3f05fb3b6e4b1e87d7e074b65d47bf9
tree04b52f201021c61b98758119c24baf0d1236a476
parent6613476e225e090cc9aad49be7fa504e290dd33d
scsi: core: Allow passthrough to request midlayer retries

For passthrough we don't retry any error which we get a check condition
for. This results in a lot of callers driving their own retries for all
UAs, specific UAs, NOT_READY, specific sense values or any type of failure.

This adds the core code to allow passthrough users to specify what errors
they want the SCSI midlayer to retry for them. We can then convert users to
drop a lot of their sense parsing and retry handling.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20240123002220.129141-2-michael.christie@oracle.com
Reviewed-by: John Garry <john.g.garry@oracle.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_lib.c
include/scsi/scsi_device.h