diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2008-10-28 22:09:30 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2008-10-28 22:09:30 +0000 |
commit | a6fcdd69093dee4fed97095848ed5c1b083c09ab (patch) | |
tree | 8826653f9460a79ea425c30bf1ec9cb8df253a99 /sys/powerpc/powermac | |
parent | 6d1fb102aad6fcea826a67f736e81d23ba535fa9 (diff) | |
download | FreeBSD-src-a6fcdd69093dee4fed97095848ed5c1b083c09ab.zip FreeBSD-src-a6fcdd69093dee4fed97095848ed5c1b083c09ab.tar.gz |
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
Diffstat (limited to 'sys/powerpc/powermac')
-rw-r--r-- | sys/powerpc/powermac/ata_dbdma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/powerpc/powermac/ata_dbdma.c b/sys/powerpc/powermac/ata_dbdma.c index fe53255..b08ade6 100644 --- a/sys/powerpc/powermac/ata_dbdma.c +++ b/sys/powerpc/powermac/ata_dbdma.c @@ -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); |