diff options
author | Robert Hancock <hancockr@shaw.ca> | 2007-01-30 03:59:18 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-01-30 09:20:39 -0500 |
commit | 78981a7c6c34bddbb90da72cf6ce10953e84aad8 (patch) | |
tree | 65e9f6dc9e9c0e8462a32e09e511ef81617264d8 /drivers | |
parent | af068bd1debcc76c1bc265aa01401901bf0067ed (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-scsi.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index d151cf057ef2..73902d335767 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -1022,11 +1022,10 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) | |||
1022 | } | 1022 | } |
1023 | 1023 | ||
1024 | tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ | 1024 | tf->command = ATA_CMD_VERIFY; /* READ VERIFY */ |
1025 | } else { | 1025 | } else |
1026 | tf->nsect = 0; /* time period value (0 implies now) */ | 1026 | /* Issue ATA STANDBY IMMEDIATE command */ |
1027 | tf->command = ATA_CMD_STANDBY; | 1027 | tf->command = ATA_CMD_STANDBYNOW1; |
1028 | /* Consider: ATA STANDBY IMMEDIATE command */ | 1028 | |
1029 | } | ||
1030 | /* | 1029 | /* |
1031 | * Standby and Idle condition timers could be implemented but that | 1030 | * Standby and Idle condition timers could be implemented but that |
1032 | * would require libata to implement the Power condition mode page | 1031 | * would require libata to implement the Power condition mode page |