summaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2005-09-27 17:38:03 +0800
committerJeff Garzik <jgarzik@pobox.com>2005-09-28 12:07:13 -0400
commit312f7da2824c82800ee78d6190f12854456957af (patch)
tree68b3b18a4ddd783a5c75dba688aabf2de0682fb3 /include/linux/ata.h
parent14be71f4c5c5ad1e222c5202ee6d234e9c8828b7 (diff)
downloadop-kernel-dev-312f7da2824c82800ee78d6190f12854456957af.zip
op-kernel-dev-312f7da2824c82800ee78d6190f12854456957af.tar.gz
[PATCH] libata: interrupt driven pio for libata-core
- add PIO_ST_FIRST for the state before sending ATAPI CDB or sending "ATA PIO data out" first data block. - add ATA_TFLAG_POLLING and ATA_DFLAG_CDB_INTR flags - remove the ATA_FLAG_NOINTR flag since the interrupt handler is now aware of the states - modify ata_pio_sector() and atapi_pio_bytes() to work in the interrupt context - modify the ata_host_intr() to handle PIO interrupts - modify ata_qc_issue_prot() to initialize states - atapi_packet_task() changed to handle "ATA PIO data out" first data block - support the pre-ATA4 ATAPI device which raise interrupt when ready to receive CDB 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index a5b74ef..6fec2f6 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -181,6 +181,7 @@ enum {
ATA_TFLAG_ISADDR = (1 << 1), /* enable r/w to nsect/lba regs */
ATA_TFLAG_DEVICE = (1 << 2), /* enable r/w to device reg */
ATA_TFLAG_WRITE = (1 << 3), /* data dir: host->dev==1 (write) */
+ ATA_TFLAG_POLLING = (1 << 4), /* set nIEN to 1 and use polling */
};
enum ata_tf_protocols {
@@ -250,6 +251,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 int atapi_cdb_len(u16 *dev_id)
{
u16 tmp = dev_id[0] & 0x3;
OpenPOWER on IntegriCloud