diff options
author | Tejun Heo <htejun@gmail.com> | 2006-05-15 08:03:38 -0400 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-05-15 08:03:38 -0400 |
commit | 88e490340ea4c3a2ebc0187a4339912e2fc1a081 (patch) | |
tree | ab2604a796754a0fba301b4362dc649136b180c3 /include | |
parent | c17ea20d9a689d7335e97e09354865cdd9f873e1 (diff) |
[PATCH] libata-ncq: add NCQ related ATA/libata constants and macros
Add NCQ related ATA/libata constants and macros.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ata.h | 9 | ||||
-rw-r--r-- | include/linux/libata.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 1cbeb434af9a..c494e1c0531e 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -133,6 +133,8 @@ enum { | |||
133 | ATA_CMD_WRITE = 0xCA, | 133 | ATA_CMD_WRITE = 0xCA, |
134 | ATA_CMD_WRITE_EXT = 0x35, | 134 | ATA_CMD_WRITE_EXT = 0x35, |
135 | ATA_CMD_WRITE_FUA_EXT = 0x3D, | 135 | ATA_CMD_WRITE_FUA_EXT = 0x3D, |
136 | ATA_CMD_FPDMA_READ = 0x60, | ||
137 | ATA_CMD_FPDMA_WRITE = 0x61, | ||
136 | ATA_CMD_PIO_READ = 0x20, | 138 | ATA_CMD_PIO_READ = 0x20, |
137 | ATA_CMD_PIO_READ_EXT = 0x24, | 139 | ATA_CMD_PIO_READ_EXT = 0x24, |
138 | ATA_CMD_PIO_WRITE = 0x30, | 140 | ATA_CMD_PIO_WRITE = 0x30, |
@@ -151,6 +153,10 @@ enum { | |||
151 | ATA_CMD_INIT_DEV_PARAMS = 0x91, | 153 | ATA_CMD_INIT_DEV_PARAMS = 0x91, |
152 | ATA_CMD_READ_NATIVE_MAX = 0xF8, | 154 | ATA_CMD_READ_NATIVE_MAX = 0xF8, |
153 | ATA_CMD_READ_NATIVE_MAX_EXT = 0x27, | 155 | ATA_CMD_READ_NATIVE_MAX_EXT = 0x27, |
156 | ATA_CMD_READ_LOG_EXT = 0x2f, | ||
157 | |||
158 | /* READ_LOG_EXT pages */ | ||
159 | ATA_LOG_SATA_NCQ = 0x10, | ||
154 | 160 | ||
155 | /* SETFEATURES stuff */ | 161 | /* SETFEATURES stuff */ |
156 | SETFEATURES_XFER = 0x03, | 162 | SETFEATURES_XFER = 0x03, |
@@ -221,6 +227,7 @@ enum ata_tf_protocols { | |||
221 | ATA_PROT_NODATA, /* no data */ | 227 | ATA_PROT_NODATA, /* no data */ |
222 | ATA_PROT_PIO, /* PIO single sector */ | 228 | ATA_PROT_PIO, /* PIO single sector */ |
223 | ATA_PROT_DMA, /* DMA */ | 229 | ATA_PROT_DMA, /* DMA */ |
230 | ATA_PROT_NCQ, /* NCQ */ | ||
224 | ATA_PROT_ATAPI, /* packet command, PIO data xfer*/ | 231 | ATA_PROT_ATAPI, /* packet command, PIO data xfer*/ |
225 | ATA_PROT_ATAPI_NODATA, /* packet command, no data */ | 232 | ATA_PROT_ATAPI_NODATA, /* packet command, no data */ |
226 | ATA_PROT_ATAPI_DMA, /* packet command with special DMA sauce */ | 233 | ATA_PROT_ATAPI_DMA, /* packet command with special DMA sauce */ |
@@ -276,6 +283,8 @@ struct ata_taskfile { | |||
276 | #define ata_id_has_pm(id) ((id)[82] & (1 << 3)) | 283 | #define ata_id_has_pm(id) ((id)[82] & (1 << 3)) |
277 | #define ata_id_has_lba(id) ((id)[49] & (1 << 9)) | 284 | #define ata_id_has_lba(id) ((id)[49] & (1 << 9)) |
278 | #define ata_id_has_dma(id) ((id)[49] & (1 << 8)) | 285 | #define ata_id_has_dma(id) ((id)[49] & (1 << 8)) |
286 | #define ata_id_has_ncq(id) ((id)[76] & (1 << 8)) | ||
287 | #define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) | ||
279 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) | 288 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) |
280 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) | 289 | #define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) |
281 | #define ata_id_u32(id,n) \ | 290 | #define ata_id_u32(id,n) \ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index db17723e23fb..7c9e280a4829 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -125,6 +125,7 @@ enum { | |||
125 | ATA_DFLAG_LBA = (1 << 0), /* device supports LBA */ | 125 | ATA_DFLAG_LBA = (1 << 0), /* device supports LBA */ |
126 | ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */ | 126 | ATA_DFLAG_LBA48 = (1 << 1), /* device supports LBA48 */ |
127 | ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */ | 127 | ATA_DFLAG_CDB_INTR = (1 << 2), /* device asserts INTRQ when ready for CDB */ |
128 | ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */ | ||
128 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, | 129 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, |
129 | 130 | ||
130 | ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */ | 131 | ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */ |
@@ -150,6 +151,7 @@ enum { | |||
150 | ATA_FLAG_IRQ_MASK = (1 << 9), /* Mask IRQ in PIO xfers */ | 151 | ATA_FLAG_IRQ_MASK = (1 << 9), /* Mask IRQ in PIO xfers */ |
151 | ATA_FLAG_PIO_POLLING = (1 << 10), /* use polling PIO if LLD | 152 | ATA_FLAG_PIO_POLLING = (1 << 10), /* use polling PIO if LLD |
152 | * doesn't handle PIO interrupts */ | 153 | * doesn't handle PIO interrupts */ |
154 | ATA_FLAG_NCQ = (1 << 11), /* host supports NCQ */ | ||
153 | 155 | ||
154 | ATA_FLAG_DEBUGMSG = (1 << 14), | 156 | ATA_FLAG_DEBUGMSG = (1 << 14), |
155 | ATA_FLAG_FLUSH_PORT_TASK = (1 << 15), /* flush port task */ | 157 | ATA_FLAG_FLUSH_PORT_TASK = (1 << 15), /* flush port task */ |