--- zzzz-none-000/linux-3.10.107/drivers/scsi/sd.c 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/drivers/scsi/sd.c 2021-11-10 11:53:55.000000000 +0000 @@ -1388,9 +1388,13 @@ retval = -ENODEV; if (scsi_block_when_processing_errors(sdp)) { - sshdr = kzalloc(sizeof(*sshdr), GFP_KERNEL); - retval = scsi_test_unit_ready(sdp, SD_TIMEOUT, SD_MAX_RETRIES, - sshdr); + /* == 20150928 AVM/WKR - STORAGE fix: TUR prevented STOP_UNIT on some hard_disks ==*/ + /* == 20170208 AVM/VGJ - TUR wakes up suspended devices. Do it only if there is no media ==*/ + retval = 0; + if (!sdkp->media_present) { + sshdr = kzalloc(sizeof(*sshdr), GFP_KERNEL); + retval = scsi_test_unit_ready(sdp, SD_TIMEOUT, SD_MAX_RETRIES, sshdr); + } } /* failed to execute TUR, assume media not present */