Date: Tue, 28 Oct 2008 22:09:30 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184429 - head/sys/powerpc/powermac Message-ID: <200810282209.m9SM9UMQ005356@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810282209.m9SM9UMQ005356>