From 09b29530db6689afca2d2d8f90dfd2a7303249cd Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Wed, 25 Mar 2009 03:42:49 +0000 Subject: [PATCH] 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. --- sys/powerpc/powermac/ata_macio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/powerpc/powermac/ata_macio.c b/sys/powerpc/powermac/ata_macio.c index 482f76e0b77..320e86e3381 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;