diff options
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r-- | include/linux/ata.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 065e91e96c2..d54da3306d2 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, |
@@ -259,7 +264,7 @@ struct ata_taskfile { | |||
259 | 264 | ||
260 | #define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) | 265 | #define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) |
261 | 266 | ||
262 | static inline int ata_id_current_chs_valid(u16 *id) | 267 | static inline int ata_id_current_chs_valid(const u16 *id) |
263 | { | 268 | { |
264 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command | 269 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command |
265 | has not been issued to the device then the values of | 270 | has not been issued to the device then the values of |
@@ -271,7 +276,7 @@ static inline int ata_id_current_chs_valid(u16 *id) | |||
271 | id[56]; /* sectors in current translation */ | 276 | id[56]; /* sectors in current translation */ |
272 | } | 277 | } |
273 | 278 | ||
274 | static inline int atapi_cdb_len(u16 *dev_id) | 279 | static inline int atapi_cdb_len(const u16 *dev_id) |
275 | { | 280 | { |
276 | u16 tmp = dev_id[0] & 0x3; | 281 | u16 tmp = dev_id[0] & 0x3; |
277 | switch (tmp) { | 282 | switch (tmp) { |
@@ -281,7 +286,7 @@ static inline int atapi_cdb_len(u16 *dev_id) | |||
281 | } | 286 | } |
282 | } | 287 | } |
283 | 288 | ||
284 | static inline int is_atapi_taskfile(struct ata_taskfile *tf) | 289 | static inline int is_atapi_taskfile(const struct ata_taskfile *tf) |
285 | { | 290 | { |
286 | return (tf->protocol == ATA_PROT_ATAPI) || | 291 | return (tf->protocol == ATA_PROT_ATAPI) || |
287 | (tf->protocol == ATA_PROT_ATAPI_NODATA) || | 292 | (tf->protocol == ATA_PROT_ATAPI_NODATA) || |