diff options
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r-- | include/linux/ata.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index d2873b732bb1..f512104a1a3f 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -192,6 +192,7 @@ enum { | |||
192 | ATA_TFLAG_DEVICE = (1 << 2), /* enable r/w to device reg */ | 192 | ATA_TFLAG_DEVICE = (1 << 2), /* enable r/w to device reg */ |
193 | ATA_TFLAG_WRITE = (1 << 3), /* data dir: host->dev==1 (write) */ | 193 | ATA_TFLAG_WRITE = (1 << 3), /* data dir: host->dev==1 (write) */ |
194 | ATA_TFLAG_LBA = (1 << 4), /* enable LBA */ | 194 | ATA_TFLAG_LBA = (1 << 4), /* enable LBA */ |
195 | ATA_TFLAG_POLLING = (1 << 5), /* set nIEN to 1 and use polling */ | ||
195 | }; | 196 | }; |
196 | 197 | ||
197 | enum ata_tf_protocols { | 198 | enum ata_tf_protocols { |
@@ -261,6 +262,8 @@ struct ata_taskfile { | |||
261 | ((u64) (id)[(n) + 1] << 16) | \ | 262 | ((u64) (id)[(n) + 1] << 16) | \ |
262 | ((u64) (id)[(n) + 0]) ) | 263 | ((u64) (id)[(n) + 0]) ) |
263 | 264 | ||
265 | #define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) | ||
266 | |||
264 | static inline int ata_id_current_chs_valid(const u16 *id) | 267 | static inline int ata_id_current_chs_valid(const u16 *id) |
265 | { | 268 | { |
266 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command | 269 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command |
@@ -290,6 +293,14 @@ static inline int is_atapi_taskfile(const struct ata_taskfile *tf) | |||
290 | (tf->protocol == ATA_PROT_ATAPI_DMA); | 293 | (tf->protocol == ATA_PROT_ATAPI_DMA); |
291 | } | 294 | } |
292 | 295 | ||
296 | static inline int is_multi_taskfile(struct ata_taskfile *tf) | ||
297 | { | ||
298 | return (tf->command == ATA_CMD_READ_MULTI) || | ||
299 | (tf->command == ATA_CMD_WRITE_MULTI) || | ||
300 | (tf->command == ATA_CMD_READ_MULTI_EXT) || | ||
301 | (tf->command == ATA_CMD_WRITE_MULTI_EXT); | ||
302 | } | ||
303 | |||
293 | static inline int ata_ok(u8 status) | 304 | static inline int ata_ok(u8 status) |
294 | { | 305 | { |
295 | return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR)) | 306 | return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR)) |