aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-14 12:01:37 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-14 12:01:37 -0700
commit228b5b7e840f79c8751614ae2b83e97e361634ce (patch)
treecf441170c2bd22a70daa5a411ea26bf149aef2bb /drivers/scsi/sd.c
parent37e79a43acf963676fc358e7c9154c0d42c4f569 (diff)
parent5fa0ae19822d60307059ee64b80ba9e5effdce58 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (31 commits) [SCSI] qla2xxx: Update version number to 8.03.00-k4. [SCSI] qla2xxx: Correct overwrite of pre-assigned init-control-block structure size. [SCSI] qla2xxx: Correct truncation in return-code status checking. [SCSI] qla2xxx: Correct vport delete bug. [SCSI] qla2xxx: Use correct value for max vport in LOOP topology. [SCSI] qla2xxx: Correct address range checking for option-rom updates. [SCSI] fcoe: Change fcoe receive thread nice value from 19 (lowest priority) to -20 [SCSI] fcoe: fix handling of pending queue, prevent out of order frames (v3) [SCSI] fcoe: Out of order tx frames was causing several check condition SCSI status [SCSI] fcoe: fix kfree(skb) [SCSI] fcoe: ETH_P_8021Q is already in if_ether and fcoe is not using it anyway [SCSI] libfc: do not change the fh_rx_id of a recevied frame [SCSI] fcoe: Correct fcoe_transports initialization vs. registration [SCSI] fcoe: Use setup_timer() and mod_timer() [SCSI] libfc, fcoe: Remove unnecessary cast by removing inline wrapper [SCSI] libfc, fcoe: Cleanup function formatting and minor typos [SCSI] libfc, fcoe: Fix kerneldoc comments [SCSI] libfc: Cleanup libfc_function_template comments [SCSI] libfc: check for err when recv and state is incorrect [SCSI] libfc: rename rp to rdata in fc_disc_new_target() ...
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 55310dbc10a..4970ae4a62d 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1167,23 +1167,19 @@ sd_spinup_disk(struct scsi_disk *sdkp)
/*
* The device does not want the automatic start to be issued.
*/
- if (sdkp->device->no_start_on_add) {
+ if (sdkp->device->no_start_on_add)
break;
- }
-
- /*
- * If manual intervention is required, or this is an
- * absent USB storage device, a spinup is meaningless.
- */
- if (sense_valid &&
- sshdr.sense_key == NOT_READY &&
- sshdr.asc == 4 && sshdr.ascq == 3) {
- break; /* manual intervention required */
- /*
- * Issue command to spin up drive when not ready
- */
- } else if (sense_valid && sshdr.sense_key == NOT_READY) {
+ if (sense_valid && sshdr.sense_key == NOT_READY) {
+ if (sshdr.asc == 4 && sshdr.ascq == 3)
+ break; /* manual intervention required */
+ if (sshdr.asc == 4 && sshdr.ascq == 0xb)
+ break; /* standby */
+ if (sshdr.asc == 4 && sshdr.ascq == 0xc)
+ break; /* unavailable */
+ /*
+ * Issue command to spin up drive when not ready
+ */
if (!spintime) {
sd_printk(KERN_NOTICE, sdkp, "Spinning up disk...");
cmd[0] = START_STOP;