diff options
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 55310dbc10a6..4970ae4a62d6 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1167,23 +1167,19 @@ sd_spinup_disk(struct scsi_disk *sdkp) | |||
1167 | /* | 1167 | /* |
1168 | * The device does not want the automatic start to be issued. | 1168 | * The device does not want the automatic start to be issued. |
1169 | */ | 1169 | */ |
1170 | if (sdkp->device->no_start_on_add) { | 1170 | if (sdkp->device->no_start_on_add) |
1171 | break; | 1171 | break; |
1172 | } | ||
1173 | |||
1174 | /* | ||
1175 | * If manual intervention is required, or this is an | ||
1176 | * absent USB storage device, a spinup is meaningless. | ||
1177 | */ | ||
1178 | if (sense_valid && | ||
1179 | sshdr.sense_key == NOT_READY && | ||
1180 | sshdr.asc == 4 && sshdr.ascq == 3) { | ||
1181 | break; /* manual intervention required */ | ||
1182 | 1172 | ||
1183 | /* | 1173 | if (sense_valid && sshdr.sense_key == NOT_READY) { |
1184 | * Issue command to spin up drive when not ready | 1174 | if (sshdr.asc == 4 && sshdr.ascq == 3) |
1185 | */ | 1175 | break; /* manual intervention required */ |
1186 | } else if (sense_valid && sshdr.sense_key == NOT_READY) { | 1176 | if (sshdr.asc == 4 && sshdr.ascq == 0xb) |
1177 | break; /* standby */ | ||
1178 | if (sshdr.asc == 4 && sshdr.ascq == 0xc) | ||
1179 | break; /* unavailable */ | ||
1180 | /* | ||
1181 | * Issue command to spin up drive when not ready | ||
1182 | */ | ||
1187 | if (!spintime) { | 1183 | if (!spintime) { |
1188 | sd_printk(KERN_NOTICE, sdkp, "Spinning up disk..."); | 1184 | sd_printk(KERN_NOTICE, sdkp, "Spinning up disk..."); |
1189 | cmd[0] = START_STOP; | 1185 | cmd[0] = START_STOP; |