diff options
author | mux <mux@FreeBSD.org> | 2003-07-27 14:38:54 +0000 |
---|---|---|
committer | mux <mux@FreeBSD.org> | 2003-07-27 14:38:54 +0000 |
commit | 82ea1f9d7eaae9e4b9228274afe78180a2386a62 (patch) | |
tree | 05eed2578c9aba4a307ce9d211fb506ca2d08631 /sys | |
parent | 41c671f8e6e15727ceb276192cb5af39136159ac (diff) | |
download | FreeBSD-src-82ea1f9d7eaae9e4b9228274afe78180a2386a62.zip FreeBSD-src-82ea1f9d7eaae9e4b9228274afe78180a2386a62.tar.gz |
Use the BUS_DMA_ZERO flag.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pci/if_rl.c | 8 | ||||
-rw-r--r-- | sys/pci/if_sis.c | 9 |
2 files changed, 5 insertions, 12 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index 436cf64..60e26e9 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -1162,13 +1162,11 @@ rl_allocmemcplus(dev, sc) /* Allocate DMA'able memory for the TX ring */ error = bus_dmamem_alloc(sc->rl_ldata.rl_tx_list_tag, - (void **)&sc->rl_ldata.rl_tx_list, BUS_DMA_NOWAIT, + (void **)&sc->rl_ldata.rl_tx_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->rl_ldata.rl_tx_list_map); if (error) return (ENOMEM); - bzero((char *)sc->rl_ldata.rl_tx_list, RL_TX_LIST_SZ); - /* Load the map for the TX ring. */ error = bus_dmamap_load(sc->rl_ldata.rl_tx_list_tag, @@ -1202,13 +1200,11 @@ rl_allocmemcplus(dev, sc) /* Allocate DMA'able memory for the RX ring */ error = bus_dmamem_alloc(sc->rl_ldata.rl_rx_list_tag, - (void **)&sc->rl_ldata.rl_rx_list, BUS_DMA_NOWAIT, + (void **)&sc->rl_ldata.rl_rx_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->rl_ldata.rl_rx_list_map); if (error) return (ENOMEM); - bzero((char *)sc->rl_ldata.rl_rx_list, RL_RX_LIST_SZ); - /* Load the map for the RX ring. */ error = bus_dmamap_load(sc->rl_ldata.rl_rx_list_tag, diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index 69822de..204e2a5 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -1270,7 +1270,7 @@ sis_attach(dev) goto fail; error = bus_dmamem_alloc(sc->sis_ldata.sis_rx_tag, - (void **)&sc->sis_ldata.sis_rx_list, BUS_DMA_NOWAIT, + (void **)&sc->sis_ldata.sis_rx_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->sis_ldata.sis_rx_dmamap); if (error) { @@ -1309,7 +1309,7 @@ sis_attach(dev) goto fail; error = bus_dmamem_alloc(sc->sis_ldata.sis_tx_tag, - (void **)&sc->sis_ldata.sis_tx_list, BUS_DMA_NOWAIT, + (void **)&sc->sis_ldata.sis_tx_list, BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->sis_ldata.sis_tx_dmamap); if (error) { @@ -1347,9 +1347,6 @@ sis_attach(dev) if (error) goto fail; - bzero(sc->sis_ldata.sis_tx_list, SIS_TX_LIST_SZ); - bzero(sc->sis_ldata.sis_rx_list, SIS_RX_LIST_SZ); - /* * Obtain the physical addresses of the RX and TX * rings which we'll need later in the init routine. @@ -1426,7 +1423,7 @@ sis_detach(dev) SIS_LOCK(sc); ifp = &sc->arpcom.ac_if; - /* These should only be active if attach succeeded */ + /* These should only be active if attach succeeded. */ if (device_is_attached(dev)) { sis_reset(sc); sis_stop(sc); |