summaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2005-11-01 19:33:20 +0800
committerJeff Garzik <jgarzik@pobox.com>2005-11-09 01:22:19 -0500
commit07f6f7d074e68d56d82e7cc5c65096033ac8dc56 (patch)
treed420722be7721691e5c56dc5a0ff326e926a58e6 /include/linux/ata.h
parentfbcdd80b0d5bde06f3483b9a13f9599a0452431c (diff)
[PATCH] libata irq-pio: add read/write multiple support
- add is_multi_taskfile() to ata.h - initialize ata_device->multi_count with device identify data - use ata_pio_sectors() to support r/w multiple commands Signed-off-by: Albert Lee <albertcc@tw.ibm.com> ======== Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index d54da3306d2..f512104a1a3 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -293,6 +293,14 @@ 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);
+}
+
static inline int ata_ok(u8 status)
{
return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR))