diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-01-23 17:20:11 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-01-23 17:20:11 +0000 |
commit | be597b794f8d52a23488bfaa06865cdc9356fd59 (patch) | |
tree | 5e48ff042bdc5a6b48e59f81c1a86f7b3ce2a2a3 | |
parent | 8a8469590df2c4820f78f91cac10aa0c4fdac153 (diff) | |
download | FreeBSD-src-be597b794f8d52a23488bfaa06865cdc9356fd59.zip FreeBSD-src-be597b794f8d52a23488bfaa06865cdc9356fd59.tar.gz |
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
-rw-r--r-- | sys/powerpc/powermac/ata_kauai.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/powerpc/powermac/ata_kauai.c b/sys/powerpc/powermac/ata_kauai.c index 3ad2a48..ef260d4 100644 --- a/sys/powerpc/powermac/ata_kauai.c +++ b/sys/powerpc/powermac/ata_kauai.c @@ -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)); |