aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_debug.c
diff options
context:
space:
mode:
authorBart Van Assche <[email protected]>2024-09-04 21:03:04 +0000
committerMartin K. Petersen <[email protected]>2024-09-13 00:40:32 +0000
commita8598aefae31f3bf27bad1a4cebf2b04a4cdf220 (patch)
tree9556c5ed81beb534011251be78d9d4572db0b405 /drivers/scsi/scsi_debug.c
parentscsi: mpi3mr: A performance fix (diff)
downloadkernel-a8598aefae31f3bf27bad1a4cebf2b04a4cdf220.tar.gz
kernel-a8598aefae31f3bf27bad1a4cebf2b04a4cdf220.zip
scsi: sd: Retry START STOP UNIT commands
During system resume, sd_start_stop_device() submits a START STOP UNIT command to the SCSI device that is being resumed. That command is not retried in case of a unit attention and hence may fail. An example: [16575.983359] sd 0:0:0:3: [sdd] Starting disk [16575.983693] sd 0:0:0:3: [sdd] Start/Stop Unit failed: Result: hostbyte=0x00 driverbyte=DRIVER_OK [16575.983712] sd 0:0:0:3: [sdd] Sense Key : 0x6 [16575.983730] sd 0:0:0:3: [sdd] ASC=0x29 ASCQ=0x0 [16575.983738] sd 0:0:0:3: PM: dpm_run_callback(): scsi_bus_resume+0x0/0xa0 returns -5 [16575.983783] sd 0:0:0:3: PM: failed to resume async: error -5 Make the SCSI core retry the START STOP UNIT command if the device reports that it has been powered on or that it has been reset. Cc: Damien Le Moal <[email protected]> Cc: Mike Christie <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
0 files changed, 0 insertions, 0 deletions