From: Matthew Dillon Date: Mon, 19 Jan 2015 17:09:05 +0000 (-0800) Subject: kernel - limit DMA for older ALI chips to 256KB X-Git-Tag: v4.2.0rc~1040 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/44de769701873813cb3ad7234931903522533e9f kernel - limit DMA for older ALI chips to 256KB * For ancient machines using old ALI chipsets which do not support 48-bit DMA, also limit the maximum DMA size to 256KB. --- diff --git a/sys/dev/disk/nata/ata-chipset.c b/sys/dev/disk/nata/ata-chipset.c index 4401053092..954858000b 100644 --- a/sys/dev/disk/nata/ata-chipset.c +++ b/sys/dev/disk/nata/ata-chipset.c @@ -1166,8 +1166,11 @@ ata_ali_allocate(device_t dev) return ENXIO; /* older chips can't do 48bit DMA transfers */ - if (ctlr->chip->chiprev <= 0xc4) + if (ctlr->chip->chiprev <= 0xc4) { ch->flags |= ATA_NO_48BIT_DMA; + if (ch->dma->max_iosize > 256 * 512) + ch->dma->max_iosize = 256 * 512; + } return 0; }