aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-03-21 10:52:49 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-21 21:21:31 -0500
commitb6782728d703fa3f0e5478a8b89e49ea10b1fdd0 (patch)
treebb3c44ac421d77c42a58ed426236897016b60991 /include/linux/ata.h
parent806a6e7a9904d4a1dfd3fd79d373bf31d71d34cb (diff)
[PATCH] libata: Add the useful macros/constants needed for merging PATA stuff
HPA presence/enabled HPA commands Also add ata_id_is_cfa() as that is needed to detect and handle CF cards which currently we reject. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 6b188b3b61dd..312a2c0c64e6 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -146,6 +146,8 @@ enum {
146 ATA_CMD_STANDBYNOW1 = 0xE0, 146 ATA_CMD_STANDBYNOW1 = 0xE0,
147 ATA_CMD_IDLEIMMEDIATE = 0xE1, 147 ATA_CMD_IDLEIMMEDIATE = 0xE1,
148 ATA_CMD_INIT_DEV_PARAMS = 0x91, 148 ATA_CMD_INIT_DEV_PARAMS = 0x91,
149 ATA_CMD_READ_NATIVE_MAX = 0xF8,
150 ATA_CMD_READ_NATIVE_MAX_EXT = 0x27,
149 151
150 /* SETFEATURES stuff */ 152 /* SETFEATURES stuff */
151 SETFEATURES_XFER = 0x03, 153 SETFEATURES_XFER = 0x03,
@@ -246,18 +248,22 @@ struct ata_taskfile {
246}; 248};
247 249
248#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) 250#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0)
251#define ata_id_is_cfa(id) ((id)[0] == 0x848A)
249#define ata_id_is_sata(id) ((id)[93] == 0) 252#define ata_id_is_sata(id) ((id)[93] == 0)
250#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) 253#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6))
251#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) 254#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5))
255#define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10))
252#define ata_id_has_fua(id) ((id)[84] & (1 << 6)) 256#define ata_id_has_fua(id) ((id)[84] & (1 << 6))
253#define ata_id_has_flush(id) ((id)[83] & (1 << 12)) 257#define ata_id_has_flush(id) ((id)[83] & (1 << 12))
254#define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13)) 258#define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13))
255#define ata_id_has_lba48(id) ((id)[83] & (1 << 10)) 259#define ata_id_has_lba48(id) ((id)[83] & (1 << 10))
260#define ata_id_has_hpa(id) ((id)[82] & (1 << 10))
256#define ata_id_has_wcache(id) ((id)[82] & (1 << 5)) 261#define ata_id_has_wcache(id) ((id)[82] & (1 << 5))
257#define ata_id_has_pm(id) ((id)[82] & (1 << 3)) 262#define ata_id_has_pm(id) ((id)[82] & (1 << 3))
258#define ata_id_has_lba(id) ((id)[49] & (1 << 9)) 263#define ata_id_has_lba(id) ((id)[49] & (1 << 9))
259#define ata_id_has_dma(id) ((id)[49] & (1 << 8)) 264#define ata_id_has_dma(id) ((id)[49] & (1 << 8))
260#define ata_id_removeable(id) ((id)[0] & (1 << 7)) 265#define ata_id_removeable(id) ((id)[0] & (1 << 7))
266#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0))
261#define ata_id_u32(id,n) \ 267#define ata_id_u32(id,n) \
262 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) 268 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
263#define ata_id_u64(id,n) \ 269#define ata_id_u64(id,n) \