--- zzzz-none-000/linux-5.4.213/drivers/scsi/sd.c 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/drivers/scsi/sd.c 2024-08-14 09:02:08.000000000 +0000 @@ -1585,10 +1585,14 @@ */ if (scsi_block_when_processing_errors(sdp)) { struct scsi_sense_hdr sshdr = { 0, }; - - retval = scsi_test_unit_ready(sdp, SD_TIMEOUT, SD_MAX_RETRIES, - &sshdr); - + + /* == 20160222 AVM/VGJ - CHANGESET: STORAGE fix: TUR prevented STOP_UNIT on some hard_disks ==*/ + /* == 20171027 AVM/VGJ - TUR wakes up suspended devices. Do it only if there is no media ==*/ + retval = 0; + if (!sdkp->media_present) + retval = scsi_test_unit_ready(sdp, SD_TIMEOUT, SD_MAX_RETRIES, + &sshdr); + /* failed to execute TUR, assume media not present */ if (host_byte(retval)) { set_media_not_present(sdkp);