Date: Sun, 6 Mar 2011 12:54:01 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r219336 - head/sys/dev/ata Message-ID: <201103061254.p26Cs113098630@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Sun Mar 6 12:54:00 2011 New Revision: 219336 URL: http://svn.freebsd.org/changeset/base/219336 Log: - Allocate the DMA memory used for the work area as coherent as at least the ataahci(4) and atamarvell(4) drivers share it between the host and the controller. - Spell some zeros as BUS_DMA_WAITOK when used as bus_dmamem_alloc() flags. MFC after: 2 weeks Modified: head/sys/dev/ata/ata-dma.c Modified: head/sys/dev/ata/ata-dma.c ============================================================================== --- head/sys/dev/ata/ata-dma.c Sun Mar 6 12:48:15 2011 (r219335) +++ head/sys/dev/ata/ata-dma.c Sun Mar 6 12:54:00 2011 (r219336) @@ -104,7 +104,8 @@ ata_dmainit(device_t dev) 0, NULL, NULL, &ch->dma.work_tag)) goto error; - if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, 0, + if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, + BUS_DMA_WAITOK | BUS_DMA_COHERENT, &ch->dma.work_map)) goto error; @@ -173,8 +174,8 @@ ata_dmaalloc(device_t dev) goto error; } - if (bus_dmamem_alloc(slot->sg_tag, (void **)&slot->sg, - 0, &slot->sg_map)) { + if (bus_dmamem_alloc(slot->sg_tag, (void **)&slot->sg, BUS_DMA_WAITOK, + &slot->sg_map)) { device_printf(ch->dev, "FAILURE - alloc sg_map\n"); goto error; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103061254.p26Cs113098630>