1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00

- 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
This commit is contained in:
Marius Strobl 2011-03-06 12:54:00 +00:00
parent 6c5276c828
commit 1ae5318fe8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219336

View File

@ -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;
}