summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2011-03-06 12:54:00 +0000
committermarius <marius@FreeBSD.org>2011-03-06 12:54:00 +0000
commitc4b1dac511ff046dc7fe03184246f8e364ecdf89 (patch)
treef37d607c68a76c1cf8fa5abc760264d11325e961 /sys/dev/ata
parentefdc3bab88588b25e0abec1cccd8e57479614115 (diff)
downloadFreeBSD-src-c4b1dac511ff046dc7fe03184246f8e364ecdf89.zip
FreeBSD-src-c4b1dac511ff046dc7fe03184246f8e364ecdf89.tar.gz
- 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
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata-dma.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c
index 872434b..46ec735 100644
--- a/sys/dev/ata/ata-dma.c
+++ b/sys/dev/ata/ata-dma.c
@@ -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;
}
OpenPOWER on IntegriCloud