summaryrefslogtreecommitdiff
path: root/sys/dev/ic/rt2661.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/rt2661.c')
-rw-r--r--sys/dev/ic/rt2661.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c
index 80124d98ab6..b9ce6f07b20 100644
--- a/sys/dev/ic/rt2661.c
+++ b/sys/dev/ic/rt2661.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2661.c,v 1.53 2010/04/20 22:05:43 tedu Exp $ */
+/* $OpenBSD: rt2661.c,v 1.54 2010/05/19 15:27:35 oga Exp $ */
/*-
* Copyright (c) 2006
@@ -386,7 +386,7 @@ rt2661_alloc_tx_ring(struct rt2661_softc *sc, struct rt2661_tx_ring *ring,
}
error = bus_dmamem_alloc(sc->sc_dmat, count * RT2661_TX_DESC_SIZE,
- PAGE_SIZE, 0, &ring->seg, 1, &nsegs, BUS_DMA_NOWAIT);
+ PAGE_SIZE, 0, &ring->seg, 1, &nsegs, BUS_DMA_NOWAIT | BUS_DMA_ZERO);
if (error != 0) {
printf("%s: could not allocate DMA memory\n",
sc->sc_dev.dv_xname);
@@ -410,7 +410,6 @@ rt2661_alloc_tx_ring(struct rt2661_softc *sc, struct rt2661_tx_ring *ring,
goto fail;
}
- memset(ring->desc, 0, count * RT2661_TX_DESC_SIZE);
ring->physaddr = ring->map->dm_segs->ds_addr;
ring->data = malloc(count * sizeof (struct rt2661_tx_data), M_DEVBUF,
@@ -528,7 +527,7 @@ rt2661_alloc_rx_ring(struct rt2661_softc *sc, struct rt2661_rx_ring *ring,
}
error = bus_dmamem_alloc(sc->sc_dmat, count * RT2661_RX_DESC_SIZE,
- PAGE_SIZE, 0, &ring->seg, 1, &nsegs, BUS_DMA_NOWAIT);
+ PAGE_SIZE, 0, &ring->seg, 1, &nsegs, BUS_DMA_NOWAIT | BUS_DMA_ZERO);
if (error != 0) {
printf("%s: could not allocate DMA memory\n",
sc->sc_dev.dv_xname);
@@ -552,7 +551,6 @@ rt2661_alloc_rx_ring(struct rt2661_softc *sc, struct rt2661_rx_ring *ring,
goto fail;
}
- memset(ring->desc, 0, count * RT2661_RX_DESC_SIZE);
ring->physaddr = ring->map->dm_segs->ds_addr;
ring->data = malloc(count * sizeof (struct rt2661_rx_data), M_DEVBUF,