aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-28 12:30:29 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-28 12:30:29 -0400
commit35ebbae2836a361330b784706b7140c90a346a53 (patch)
treeada3c046a8b6bfdf21bcb0932b4b65c95c2af073 /include/linux/ata.h
parentc6a33e2464edd87f8c12cc2d11369a5b44c65b77 (diff)
parent5fadd053d9bb4345ec6f405d24db4e7eb49cf81e (diff)
Merge branch 'master'
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index b7e7e1cb2633..9245b97845aa 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -42,13 +42,18 @@ enum {
42 ATA_SECT_SIZE = 512, 42 ATA_SECT_SIZE = 512,
43 43
44 ATA_ID_WORDS = 256, 44 ATA_ID_WORDS = 256,
45 ATA_ID_PROD_OFS = 27,
46 ATA_ID_FW_REV_OFS = 23,
47 ATA_ID_SERNO_OFS = 10, 45 ATA_ID_SERNO_OFS = 10,
48 ATA_ID_MAJOR_VER = 80, 46 ATA_ID_FW_REV_OFS = 23,
49 ATA_ID_PIO_MODES = 64, 47 ATA_ID_PROD_OFS = 27,
48 ATA_ID_OLD_PIO_MODES = 51,
49 ATA_ID_FIELD_VALID = 53,
50 ATA_ID_MWDMA_MODES = 63, 50 ATA_ID_MWDMA_MODES = 63,
51 ATA_ID_PIO_MODES = 64,
52 ATA_ID_EIDE_DMA_MIN = 65,
53 ATA_ID_EIDE_PIO = 67,
54 ATA_ID_EIDE_PIO_IORDY = 68,
51 ATA_ID_UDMA_MODES = 88, 55 ATA_ID_UDMA_MODES = 88,
56 ATA_ID_MAJOR_VER = 80,
52 ATA_ID_PIO4 = (1 << 1), 57 ATA_ID_PIO4 = (1 << 1),
53 58
54 ATA_PCI_CTL_OFS = 2, 59 ATA_PCI_CTL_OFS = 2,
@@ -256,7 +261,7 @@ struct ata_taskfile {
256 ((u64) (id)[(n) + 1] << 16) | \ 261 ((u64) (id)[(n) + 1] << 16) | \
257 ((u64) (id)[(n) + 0]) ) 262 ((u64) (id)[(n) + 0]) )
258 263
259static inline int ata_id_current_chs_valid(u16 *id) 264static inline int ata_id_current_chs_valid(const u16 *id)
260{ 265{
261 /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command 266 /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command
262 has not been issued to the device then the values of 267 has not been issued to the device then the values of
@@ -268,7 +273,7 @@ static inline int ata_id_current_chs_valid(u16 *id)
268 id[56]; /* sectors in current translation */ 273 id[56]; /* sectors in current translation */
269} 274}
270 275
271static inline int atapi_cdb_len(u16 *dev_id) 276static inline int atapi_cdb_len(const u16 *dev_id)
272{ 277{
273 u16 tmp = dev_id[0] & 0x3; 278 u16 tmp = dev_id[0] & 0x3;
274 switch (tmp) { 279 switch (tmp) {
@@ -278,7 +283,7 @@ static inline int atapi_cdb_len(u16 *dev_id)
278 } 283 }
279} 284}
280 285
281static inline int is_atapi_taskfile(struct ata_taskfile *tf) 286static inline int is_atapi_taskfile(const struct ata_taskfile *tf)
282{ 287{
283 return (tf->protocol == ATA_PROT_ATAPI) || 288 return (tf->protocol == ATA_PROT_ATAPI) ||
284 (tf->protocol == ATA_PROT_ATAPI_NODATA) || 289 (tf->protocol == ATA_PROT_ATAPI_NODATA) ||