--- zzzz-none-000/linux-4.4.60/drivers/scsi/sd.c 2017-04-08 07:53:53.000000000 +0000 +++ dragonfly-4020-701/linux-4.4.60/drivers/scsi/sd.c 2018-11-08 13:36:17.000000000 +0000 @@ -1432,9 +1432,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); + /* == 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) { + 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 */