diff options
author | cognet <cognet@FreeBSD.org> | 2007-07-27 14:48:05 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2007-07-27 14:48:05 +0000 |
commit | c99cd3cdb432a2007a54da48c595accdd7f062b9 (patch) | |
tree | e39f563f6ec864416653fd182da7154f9ba90bf4 /sys/dev/em/if_em.c | |
parent | 72f29f4f32b845f796a33c1edccdbfb0ce03d759 (diff) | |
download | FreeBSD-src-c99cd3cdb432a2007a54da48c595accdd7f062b9.zip FreeBSD-src-c99cd3cdb432a2007a54da48c595accdd7f062b9.tar.gz |
Use coherent mapping for DMA on arm. This is propably suitable for the
other archs, but I can't test it so I made it conditionnal on __arm__
for now.
Approved by: re (blanket)
Diffstat (limited to 'sys/dev/em/if_em.c')
-rw-r--r-- | sys/dev/em/if_em.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index 73d16d2..4950ad9 100644 --- a/sys/dev/em/if_em.c +++ b/sys/dev/em/if_em.c @@ -2941,8 +2941,13 @@ em_dma_malloc(struct adapter *adapter, bus_size_t size, goto fail_0; } +#ifdef __arm__ + error = bus_dmamem_alloc(dma->dma_tag, (void**) &dma->dma_vaddr, + BUS_DMA_NOWAIT | BUS_DMA_COHERENT, &dma->dma_map); +#else error = bus_dmamem_alloc(dma->dma_tag, (void**) &dma->dma_vaddr, BUS_DMA_NOWAIT, &dma->dma_map); +#endif if (error) { device_printf(adapter->dev, "%s: bus_dmamem_alloc(%ju) failed: %d\n", |