summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2003-07-27 13:56:03 +0000
committermux <mux@FreeBSD.org>2003-07-27 13:56:03 +0000
commit7639e1b6db53a62d8c4bdf4eeeff53bdc42da8f8 (patch)
treeebbc0e3dc2e2241fb6db56fa26d1224030ce350a /sys/pci
parent4e543dc21243ab3f7b1444dd28899ce4ce4f7a67 (diff)
downloadFreeBSD-src-7639e1b6db53a62d8c4bdf4eeeff53bdc42da8f8.zip
FreeBSD-src-7639e1b6db53a62d8c4bdf4eeeff53bdc42da8f8.tar.gz
Use the BUS_DMA_ZERO flag instead of bzero()'ing DMA memory.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_xl.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index 9a0f983..a5922ab 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -1489,7 +1489,7 @@ xl_attach(dev)
}
error = bus_dmamem_alloc(sc->xl_ldata.xl_rx_tag,
- (void **)&sc->xl_ldata.xl_rx_list, BUS_DMA_NOWAIT,
+ (void **)&sc->xl_ldata.xl_rx_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
&sc->xl_ldata.xl_rx_dmamap);
if (error) {
printf("xl%d: no memory for rx list buffers!\n", unit);
@@ -1521,7 +1521,7 @@ xl_attach(dev)
}
error = bus_dmamem_alloc(sc->xl_ldata.xl_tx_tag,
- (void **)&sc->xl_ldata.xl_tx_list, BUS_DMA_NOWAIT,
+ (void **)&sc->xl_ldata.xl_tx_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO,
&sc->xl_ldata.xl_tx_dmamap);
if (error) {
printf("xl%d: no memory for list buffers!\n", unit);
@@ -1555,9 +1555,6 @@ xl_attach(dev)
goto fail;
}
- bzero(sc->xl_ldata.xl_tx_list, XL_TX_LIST_SZ);
- bzero(sc->xl_ldata.xl_rx_list, XL_RX_LIST_SZ);
-
/* We need a spare DMA map for the RX ring. */
error = bus_dmamap_create(sc->xl_mtag, 0, &sc->xl_tmpmap);
if (error)
OpenPOWER on IntegriCloud