diff options
author | Mark Lord <liml@rtr.ca> | 2007-04-17 18:26:07 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 14:40:40 -0400 |
commit | 169439c2e35f01e7832a9b4fc8a7446980c3d593 (patch) | |
tree | 83cbc6898be74b2bfb49bd4eaa966913c49de9da /include/linux/ata.h | |
parent | 1e999736cafdffc374f22eed37b291129ef82e4e (diff) |
libata: Handle drives that require a spin-up command before first access
(S)ATA drives can be configured for "power-up in standby",
a mode whereby a specific "spin up now!" command is required
before the first media access.
Currently, a drive with this feature enabled can not be used at all
with libata, and once in this mode, the drive becomes a doorstop.
The older drivers/ide subsystem at least enumerates the drive,
so that it can be woken up after the fact from a userspace HDIO_*
command, but not libata.
This patch adds support to libata for the "power-up in standby"
mode where a "spin up now!" command (SET_FEATURES) is needed.
With this, libata will recognize such drives, spin them up,
and then re-IDENTIFY them if necessary to get a full/complete
set of drive features data.
Drives in this state are determined by looking for
special values in id[2], as documented in the current ATA specs.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r-- | include/linux/ata.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index f4dc8dfeadc2..edb31bfff68f 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -202,6 +202,8 @@ enum { | |||
202 | SETFEATURES_WC_ON = 0x02, /* Enable write cache */ | 202 | SETFEATURES_WC_ON = 0x02, /* Enable write cache */ |
203 | SETFEATURES_WC_OFF = 0x82, /* Disable write cache */ | 203 | SETFEATURES_WC_OFF = 0x82, /* Disable write cache */ |
204 | 204 | ||
205 | SETFEATURES_SPINUP = 0x07, /* Spin-up drive */ | ||
206 | |||
205 | /* ATAPI stuff */ | 207 | /* ATAPI stuff */ |
206 | ATAPI_PKT_DMA = (1 << 0), | 208 | ATAPI_PKT_DMA = (1 << 0), |
207 | ATAPI_DMADIR = (1 << 2), /* ATAPI data dir: | 209 | ATAPI_DMADIR = (1 << 2), /* ATAPI data dir: |