svn commit: r184429 - head/sys/powerpc/powermac
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Tue Oct 28 15:09:30 PDT 2008
Author: nwhitehorn
Date: Tue Oct 28 22:09:30 2008
New Revision: 184429
URL: http://svn.freebsd.org/changeset/base/184429
Log:
DBDMA can transfer a maximum of 64K - 1 bytes per descriptor, as the byte
count field is 16 bits. Inform ATA of this fact.
Reported by: Marco Trillo
Modified:
head/sys/powerpc/powermac/ata_dbdma.c
Modified: head/sys/powerpc/powermac/ata_dbdma.c
==============================================================================
--- head/sys/powerpc/powermac/ata_dbdma.c Tue Oct 28 22:05:20 2008 (r184428)
+++ head/sys/powerpc/powermac/ata_dbdma.c Tue Oct 28 22:09:30 2008 (r184429)
@@ -275,6 +275,12 @@ ata_dbdma_dmainit(device_t dev)
sc->sc_ch.dma.load = ata_dbdma_load;
sc->sc_ch.dma.reset = ata_dbdma_reset;
+ /*
+ * DBDMA's field for transfer size is 16 bits. This will overflow
+ * if we try to do a 64K transfer, so stop short of 64K.
+ */
+ sc->sc_ch.dma.segsize = 126 * DEV_BSIZE;
+
sc->sc_ch.hw.status = ata_dbdma_status;
mtx_init(&sc->dbdma_mtx, "ATA DBDMA", NULL, MTX_DEF);
More information about the svn-src-all
mailing list