svn commit: r217756 - head/sys/powerpc/powermac
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sun Jan 23 17:20:12 UTC 2011
Author: nwhitehorn
Date: Sun Jan 23 17:20:11 2011
New Revision: 217756
URL: http://svn.freebsd.org/changeset/base/217756
Log:
Disable ATAPI DMA unconditionally on Apple Kauai ATA controllers, like it
is on the MacIO ones. It appears to be unreliable on all DBDMA-based
controllers for unknown reasons, which should be figured out eventually.
Tested by: Torfinn Ingolfsen
MFC after: 1 week
Modified:
head/sys/powerpc/powermac/ata_kauai.c
Modified: head/sys/powerpc/powermac/ata_kauai.c
==============================================================================
--- head/sys/powerpc/powermac/ata_kauai.c Sun Jan 23 17:13:29 2011 (r217755)
+++ head/sys/powerpc/powermac/ata_kauai.c Sun Jan 23 17:20:11 2011 (r217756)
@@ -217,10 +217,8 @@ ata_kauai_probe(device_t dev)
ch = &sc->sc_ch.sc_ch;
compatstring = ofw_bus_get_compat(dev);
- if (compatstring != NULL && strcmp(compatstring,"shasta-ata") == 0) {
- ch->flags |= ATA_NO_ATAPI_DMA;
+ if (compatstring != NULL && strcmp(compatstring,"shasta-ata") == 0)
sc->shasta = 1;
- }
/* Pre-K2 controllers apparently need this hack */
if (!sc->shasta &&
@@ -246,8 +244,11 @@ ata_kauai_probe(device_t dev)
ch->r_io[ATA_CONTROL].offset = ATA_KAUAI_ALTOFFSET;
ata_default_registers(dev);
- ch->unit = 0;
- ch->flags |= ATA_USE_16BIT;
+ ch->unit = 0;
+ ch->flags |= ATA_USE_16BIT;
+
+ /* XXX: ATAPI DMA is unreliable. We should find out why. */
+ ch->flags |= ATA_NO_ATAPI_DMA;
ata_generic_hw(dev);
return (ata_probe(dev));
More information about the svn-src-all
mailing list