summaryrefslogtreecommitdiff
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2004-12-07 08:54:34 -0500
committerJeff Garzik <jgarzik@pobox.com>2004-12-07 08:54:34 -0500
commit046de9be7179b9b97eb899aa7c5b0c2c83a87b21 (patch)
treeffb869b73cb051b6231c8331fb46db273b45eb3c /include/linux/libata.h
parent6695ad97269159f81361d988b773750ce81fba37 (diff)
[libata] only DMA map data for DMA commands (fix >=4GB bug)
libata made the assumption that (for PIO commands in this case) it could modify DMA memory at the kernel-virtual address, after mapping this. This is incorrect, and fails on e.g. platforms that copy DMA memory back and forth (swiotlb on Intel EM64T and IA64). Remove this assumption by ensuring that we only call the DMA mapping routines if we really are going to use DMA for data xfer. Also: remove a bogus WARN_ON() in ata_sg_init_one() which caused bug reports (but no problems).
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 605e0a728c0e..95a7b0ddb096 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -112,6 +112,7 @@ enum {
ATA_FLAG_SRST = (1 << 5), /* use ATA SRST, not E.D.D. */
ATA_FLAG_MMIO = (1 << 6), /* use MMIO, not PIO */
ATA_FLAG_SATA_RESET = (1 << 7), /* use COMRESET */
+ ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */
ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */