Allocate the DMA memory shared between the host and the controller as

coherent.

MFC after:	2 weeks
This commit is contained in:
Marius Strobl 2011-03-11 22:23:46 +00:00
parent f8cb22fa6c
commit a1dd7a55b0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219545

View File

@ -960,8 +960,8 @@ stge_dma_alloc(struct stge_softc *sc)
/* allocate DMA'able memory and load the DMA map for Tx ring. */
error = bus_dmamem_alloc(sc->sc_cdata.stge_tx_ring_tag,
(void **)&sc->sc_rdata.stge_tx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
&sc->sc_cdata.stge_tx_ring_map);
(void **)&sc->sc_rdata.stge_tx_ring, BUS_DMA_NOWAIT |
BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->sc_cdata.stge_tx_ring_map);
if (error != 0) {
device_printf(sc->sc_dev,
"failed to allocate DMA'able memory for Tx ring\n");
@ -981,8 +981,8 @@ stge_dma_alloc(struct stge_softc *sc)
/* allocate DMA'able memory and load the DMA map for Rx ring. */
error = bus_dmamem_alloc(sc->sc_cdata.stge_rx_ring_tag,
(void **)&sc->sc_rdata.stge_rx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
&sc->sc_cdata.stge_rx_ring_map);
(void **)&sc->sc_rdata.stge_rx_ring, BUS_DMA_NOWAIT |
BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc->sc_cdata.stge_rx_ring_map);
if (error != 0) {
device_printf(sc->sc_dev,
"failed to allocate DMA'able memory for Rx ring\n");