aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index e7b0c21f6cd4..206d859083ea 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,
@@ -205,7 +207,6 @@ enum ata_tf_protocols {
205 ATA_PROT_UNKNOWN, /* unknown/invalid */ 207 ATA_PROT_UNKNOWN, /* unknown/invalid */
206 ATA_PROT_NODATA, /* no data */ 208 ATA_PROT_NODATA, /* no data */
207 ATA_PROT_PIO, /* PIO single sector */ 209 ATA_PROT_PIO, /* PIO single sector */
208 ATA_PROT_PIO_MULT, /* PIO multiple sector */
209 ATA_PROT_DMA, /* DMA */ 210 ATA_PROT_DMA, /* DMA */
210 ATA_PROT_ATAPI, /* packet command, PIO data xfer*/ 211 ATA_PROT_ATAPI, /* packet command, PIO data xfer*/
211 ATA_PROT_ATAPI_NODATA, /* packet command, no data */ 212 ATA_PROT_ATAPI_NODATA, /* packet command, no data */
@@ -248,18 +249,22 @@ struct ata_taskfile {
248}; 249};
249 250
250#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) 251#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0)
252#define ata_id_is_cfa(id) ((id)[0] == 0x848A)
251#define ata_id_is_sata(id) ((id)[93] == 0) 253#define ata_id_is_sata(id) ((id)[93] == 0)
252#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) 254#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6))
253#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) 255#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5))
256#define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10))
254#define ata_id_has_fua(id) ((id)[84] & (1 << 6)) 257#define ata_id_has_fua(id) ((id)[84] & (1 << 6))
255#define ata_id_has_flush(id) ((id)[83] & (1 << 12)) 258#define ata_id_has_flush(id) ((id)[83] & (1 << 12))
256#define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13)) 259#define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13))
257#define ata_id_has_lba48(id) ((id)[83] & (1 << 10)) 260#define ata_id_has_lba48(id) ((id)[83] & (1 << 10))
261#define ata_id_has_hpa(id) ((id)[82] & (1 << 10))
258#define ata_id_has_wcache(id) ((id)[82] & (1 << 5)) 262#define ata_id_has_wcache(id) ((id)[82] & (1 << 5))
259#define ata_id_has_pm(id) ((id)[82] & (1 << 3)) 263#define ata_id_has_pm(id) ((id)[82] & (1 << 3))
260#define ata_id_has_lba(id) ((id)[49] & (1 << 9)) 264#define ata_id_has_lba(id) ((id)[49] & (1 << 9))
261#define ata_id_has_dma(id) ((id)[49] & (1 << 8)) 265#define ata_id_has_dma(id) ((id)[49] & (1 << 8))
262#define ata_id_removeable(id) ((id)[0] & (1 << 7)) 266#define ata_id_removeable(id) ((id)[0] & (1 << 7))
267#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0))
263#define ata_id_u32(id,n) \ 268#define ata_id_u32(id,n) \
264 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) 269 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
265#define ata_id_u64(id,n) \ 270#define ata_id_u64(id,n) \