svn commit: r219991 - stable/8/sys/dev/sk
Marius Strobl
marius at FreeBSD.org
Fri Mar 25 12:47:02 UTC 2011
Author: marius
Date: Fri Mar 25 12:47:01 2011
New Revision: 219991
URL: http://svn.freebsd.org/changeset/base/219991
Log:
MFC: r219544
Allocate the DMA memory shared between the host and the controller as
coherent.
Modified:
stable/8/sys/dev/sk/if_sk.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/dev/sk/if_sk.c
==============================================================================
--- stable/8/sys/dev/sk/if_sk.c Fri Mar 25 12:46:08 2011 (r219990)
+++ stable/8/sys/dev/sk/if_sk.c Fri Mar 25 12:47:01 2011 (r219991)
@@ -2036,8 +2036,8 @@ sk_dma_alloc(sc_if)
/* allocate DMA'able memory and load the DMA map for Tx ring */
error = bus_dmamem_alloc(sc_if->sk_cdata.sk_tx_ring_tag,
- (void **)&sc_if->sk_rdata.sk_tx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
- &sc_if->sk_cdata.sk_tx_ring_map);
+ (void **)&sc_if->sk_rdata.sk_tx_ring, BUS_DMA_NOWAIT |
+ BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc_if->sk_cdata.sk_tx_ring_map);
if (error != 0) {
device_printf(sc_if->sk_if_dev,
"failed to allocate DMA'able memory for Tx ring\n");
@@ -2057,8 +2057,8 @@ sk_dma_alloc(sc_if)
/* allocate DMA'able memory and load the DMA map for Rx ring */
error = bus_dmamem_alloc(sc_if->sk_cdata.sk_rx_ring_tag,
- (void **)&sc_if->sk_rdata.sk_rx_ring, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
- &sc_if->sk_cdata.sk_rx_ring_map);
+ (void **)&sc_if->sk_rdata.sk_rx_ring, BUS_DMA_NOWAIT |
+ BUS_DMA_COHERENT | BUS_DMA_ZERO, &sc_if->sk_cdata.sk_rx_ring_map);
if (error != 0) {
device_printf(sc_if->sk_if_dev,
"failed to allocate DMA'able memory for Rx ring\n");
@@ -2165,8 +2165,9 @@ sk_dma_jumbo_alloc(sc_if)
/* allocate DMA'able memory and load the DMA map for jumbo Rx ring */
error = bus_dmamem_alloc(sc_if->sk_cdata.sk_jumbo_rx_ring_tag,
- (void **)&sc_if->sk_rdata.sk_jumbo_rx_ring,
- BUS_DMA_NOWAIT|BUS_DMA_ZERO, &sc_if->sk_cdata.sk_jumbo_rx_ring_map);
+ (void **)&sc_if->sk_rdata.sk_jumbo_rx_ring, BUS_DMA_NOWAIT |
+ BUS_DMA_COHERENT | BUS_DMA_ZERO,
+ &sc_if->sk_cdata.sk_jumbo_rx_ring_map);
if (error != 0) {
device_printf(sc_if->sk_if_dev,
"failed to allocate DMA'able memory for jumbo Rx ring\n");
More information about the svn-src-stable-8
mailing list