libata: fix translation for START STOP UNIT
libata's SCSI translation for the SCSI START STOP UNIT command with the START bit clear (i.e. stopping the drive) appears to be incorrect. It sends an ATA STANDBY command with the time period set to 0, which the code comment says means "now", but the ATA standard says this means disable the standby timer, which effectively does nothing. Change this to issue a STANDBY IMMEDIATE command which will actually spin the drive down. The SAT (SCSI/ATA Translation) standard revision 9 concurs with this choice. Signed-off-by: Robert Hancock <hancockr@shaw.ca> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
af068bd1de
commit
78981a7c6c
1 changed files with 4 additions and 5 deletions
|
@ -1022,11 +1022,10 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc)
|
||||||
}
|
}
|
||||||
|
|
||||||
tf->command = ATA_CMD_VERIFY; /* READ VERIFY */
|
tf->command = ATA_CMD_VERIFY; /* READ VERIFY */
|
||||||
} else {
|
} else
|
||||||
tf->nsect = 0; /* time period value (0 implies now) */
|
/* Issue ATA STANDBY IMMEDIATE command */
|
||||||
tf->command = ATA_CMD_STANDBY;
|
tf->command = ATA_CMD_STANDBYNOW1;
|
||||||
/* Consider: ATA STANDBY IMMEDIATE command */
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Standby and Idle condition timers could be implemented but that
|
* Standby and Idle condition timers could be implemented but that
|
||||||
* would require libata to implement the Power condition mode page
|
* would require libata to implement the Power condition mode page
|
||||||
|
|
Reference in a new issue