Message ID | 485ac2f7-e83a-6fcd-b849-c20608e26810@gmail.com |
---|---|
State | New |
Headers | show |
Series | sd_spinup_disk() now is a little noisy | expand |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index cbd9999f9..af7e7b0da 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2124,6 +2124,8 @@ sd_spinup_disk(struct scsi_disk *sdkp) retries = 0; do { + u8 media_was_present = sdkp->media_present; + cmd[0] = TEST_UNIT_READY; memset((void *) &cmd[1], 0, 9); @@ -2138,7 +2140,8 @@ sd_spinup_disk(struct scsi_disk *sdkp) * with any more polling. */ if (media_not_present(sdkp, &sshdr)) { - sd_printk(KERN_NOTICE, sdkp, "Media removed, stopped polling\n"); + if (media_was_present) + sd_printk(KERN_NOTICE, sdkp, "Media removed, stopped polling\n"); return; }