diff options
author | Mike Christie <[email protected]> | 2024-01-22 18:22:04 -0600 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2024-01-29 21:20:53 -0500 |
commit | 987d7d3db0b9b5428c4888ed375cca290667a597 (patch) | |
tree | 15fcffc259a73c1afafdde88ea9c556306858138 | |
parent | 2a1f96f60a4bf28207da653a844ea471840d2b91 (diff) |
scsi: core: Retry INQUIRY after timeout
Description from: Martin Wilck <[email protected]>:
The SCSI mid layer doesn't retry commands after DID_TIME_OUT (see
scsi_noretry_cmd()). Packet loss in the fabric can cause spurious timeouts
during SCSI device probing, causing device probing to fail. This has been
observed in FCoE uplink failover tests, for example.
This patch fixes the issue by retrying the INQUIRY.
Signed-off-by: Mike Christie <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Martin Wilck <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r-- | drivers/scsi/scsi_scan.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index a2bed0dbf996..8ded08f37337 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -665,6 +665,10 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result, .asc = 0x29, .result = SAM_STAT_CHECK_CONDITION, }, + { + .allowed = 1, + .result = DID_TIME_OUT << 16, + }, {} }; struct scsi_failures failures = { |