aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index b02a16c435e7..469952366ed4 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -197,6 +197,7 @@ enum {
197 ATA_TFLAG_WRITE = (1 << 3), /* data dir: host->dev==1 (write) */ 197 ATA_TFLAG_WRITE = (1 << 3), /* data dir: host->dev==1 (write) */
198 ATA_TFLAG_LBA = (1 << 4), /* enable LBA */ 198 ATA_TFLAG_LBA = (1 << 4), /* enable LBA */
199 ATA_TFLAG_FUA = (1 << 5), /* enable FUA */ 199 ATA_TFLAG_FUA = (1 << 5), /* enable FUA */
200 ATA_TFLAG_POLLING = (1 << 6), /* set nIEN to 1 and use polling */
200}; 201};
201 202
202enum ata_tf_protocols { 203enum ata_tf_protocols {
@@ -267,6 +268,8 @@ struct ata_taskfile {
267 ((u64) (id)[(n) + 1] << 16) | \ 268 ((u64) (id)[(n) + 1] << 16) | \
268 ((u64) (id)[(n) + 0]) ) 269 ((u64) (id)[(n) + 0]) )
269 270
271#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20)
272
270static inline unsigned int ata_id_major_version(const u16 *id) 273static inline unsigned int ata_id_major_version(const u16 *id)
271{ 274{
272 unsigned int mver; 275 unsigned int mver;
@@ -306,6 +309,14 @@ static inline int is_atapi_taskfile(const struct ata_taskfile *tf)
306 (tf->protocol == ATA_PROT_ATAPI_DMA); 309 (tf->protocol == ATA_PROT_ATAPI_DMA);
307} 310}
308 311
312static inline int is_multi_taskfile(struct ata_taskfile *tf)
313{
314 return (tf->command == ATA_CMD_READ_MULTI) ||
315 (tf->command == ATA_CMD_WRITE_MULTI) ||
316 (tf->command == ATA_CMD_READ_MULTI_EXT) ||
317 (tf->command == ATA_CMD_WRITE_MULTI_EXT);
318}
319
309static inline int ata_ok(u8 status) 320static inline int ata_ok(u8 status)
310{ 321{
311 return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR)) 322 return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR))