summaryrefslogtreecommitdiff
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-05-15 15:59:15 +0400
committerTejun Heo <htejun@gmail.com>2006-05-15 15:59:15 +0400
commit12436c30f4808e00fa008c6787c609bc6ae216ba (patch)
tree22ddaad8def4f4a77637a3da62a8d8f422a95c29 /include/linux/ata.h
parent88ce7550c38f46c8697f53727a571bf838bee398 (diff)
parent7894eaf291238a62a565e9e9777483beeb00eeae (diff)
downloadlinux-12436c30f4808e00fa008c6787c609bc6ae216ba.tar.xz
Merge branch 'irq-pio'
Conflicts: drivers/scsi/libata-core.c include/linux/libata.h
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index a7c41f3df8f4..1cbeb434af9a 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -212,6 +212,7 @@ enum {
ATA_TFLAG_WRITE = (1 << 3), /* data dir: host->dev==1 (write) */
ATA_TFLAG_LBA = (1 << 4), /* enable LBA */
ATA_TFLAG_FUA = (1 << 5), /* enable FUA */
+ ATA_TFLAG_POLLING = (1 << 6), /* set nIEN to 1 and use polling */
};
enum ata_tf_protocols {
@@ -285,6 +286,8 @@ struct ata_taskfile {
((u64) (id)[(n) + 1] << 16) | \
((u64) (id)[(n) + 0]) )
+#define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20)
+
static inline unsigned int ata_id_major_version(const u16 *id)
{
unsigned int mver;
@@ -324,6 +327,15 @@ static inline int is_atapi_taskfile(const struct ata_taskfile *tf)
(tf->protocol == ATA_PROT_ATAPI_DMA);
}
+static inline int is_multi_taskfile(struct ata_taskfile *tf)
+{
+ return (tf->command == ATA_CMD_READ_MULTI) ||
+ (tf->command == ATA_CMD_WRITE_MULTI) ||
+ (tf->command == ATA_CMD_READ_MULTI_EXT) ||
+ (tf->command == ATA_CMD_WRITE_MULTI_EXT) ||
+ (tf->command == ATA_CMD_WRITE_MULTI_FUA_EXT);
+}
+
static inline int ata_ok(u8 status)
{
return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR))