summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlbert Lee <albertcc@tw.ibm.com>2004-12-27 05:29:14 -0500
committerJeff Garzik <jgarzik@pobox.com>2004-12-27 05:29:14 -0500
commita56bb4da9a52fb1e8da15f8152b665cbf6ca2d64 (patch)
treea34e2b62fd62cd372bb6808f56e7637199a3e5cc /include/linux
parent623b57b30106cbc5755aa1e622f1806b3c8dd7a9 (diff)
[libata] verify ATAPI DMA for a given request is OK
After some testing, it seems that some PATA host adapter (ex. pdc20275) cannot work reliably with specific request buffer sizes under ATAPI DMA mode. Detailed test result: 4096, 2048, 1024, 512, 256: OK 384, 257, 255, 128, 96, 64, 32: failed (irq lost) It seems multiple of 256 bytes are the safe ATAPI DMA buffer sizes to use. Attached please find the patch to fix the pdc2027x ATAPI DMA problem. Changes: 1. Add a callback function "check_atapi_dma()" to ata_port_operations such that libata core can ask the driver: "Can this command be processed in ATAPI DMA mode safely? " when the the command is received. 2. ATAPI DMA is off by default if the callback function is not provided by the driver If the callback function is not provided by the driver, the ATAPI DMA should be as is. The ATAPI DMA is already controlled by dev->flags. BTW, the patch isolates the ATAPI DMA workaround to the pdc20275 driver itself, not impacting libata core . Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/libata.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 95a7b0ddb096..a436be7d78aa 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -339,6 +339,8 @@ struct ata_port_operations {
void (*phy_reset) (struct ata_port *ap);
void (*post_set_mode) (struct ata_port *ap);
+ int (*check_atapi_dma) (struct ata_queued_cmd *qc);
+
void (*bmdma_setup) (struct ata_queued_cmd *qc);
void (*bmdma_start) (struct ata_queued_cmd *qc);