aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-28 12:30:16 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-28 12:30:16 -0400
commit15dbb5a3f971a28040ae6cbcd8bbdf19b629fa83 (patch)
treee65562d7300ac653207b1e45ec7e5960ddf78fff /include/linux/ata.h
parentbe697c3f137c9ed808753bbbc5d7751c6e5303fc (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 065e91e96c27..d54da3306d2c 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
262static inline int ata_id_current_chs_valid(u16 *id) 267static 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
274static inline int atapi_cdb_len(u16 *dev_id) 279static 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
284static inline int is_atapi_taskfile(struct ata_taskfile *tf) 289static 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) ||