summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2009-03-25 03:42:49 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2009-03-25 03:42:49 +0000
commite4ac427700c0a1d558e3fcefcbb4e5d7d478a6c7 (patch)
tree1dc5d5264da4cf6495d9da7967e31ae6eafbd974
parent185450a1c57199eb6a88ee1ee9a61568064a66ad (diff)
downloadFreeBSD-src-e4ac427700c0a1d558e3fcefcbb4e5d7d478a6c7.zip
FreeBSD-src-e4ac427700c0a1d558e3fcefcbb4e5d7d478a6c7.tar.gz
Disable ATA DMA for ATAPI devices for now. Apparently, certain revisions
of this controller, in combination with certain ATAPI devices and phases of the moon, will cause DMA operations for ATAPI to fail.
-rw-r--r--sys/powerpc/powermac/ata_macio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/powerpc/powermac/ata_macio.c b/sys/powerpc/powermac/ata_macio.c
index 482f76e..320e86e 100644
--- a/sys/powerpc/powermac/ata_macio.c
+++ b/sys/powerpc/powermac/ata_macio.c
@@ -259,6 +259,10 @@ ata_macio_setmode(device_t parent, device_t dev)
mode = ata_limit_mode(dev, mode, sc->max_mode);
+ /* XXX Some controllers don't work correctly with ATAPI DMA */
+ if (atadev->param.config & ATA_PROTO_ATAPI)
+ mode = ata_limit_mode(dev, mode, ATA_PIO_MAX);
+
if (ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode))
return;
OpenPOWER on IntegriCloud