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); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[EMAIL PROTECTED]"