summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2003-07-27 14:00:02 +0000
committermux <mux@FreeBSD.org>2003-07-27 14:00:02 +0000
commita134e1ecc462f4c6d1a927d9ffaba403c14443a7 (patch)
treeb0cb11dbb18c003116ae217ed7d820eef26a1e35 /sys/dev/fxp
parent7639e1b6db53a62d8c4bdf4eeeff53bdc42da8f8 (diff)
downloadFreeBSD-src-a134e1ecc462f4c6d1a927d9ffaba403c14443a7.zip
FreeBSD-src-a134e1ecc462f4c6d1a927d9ffaba403c14443a7.tar.gz
Use the BUS_DMA_ZERO flag.
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index f42a9d6..31e77b5 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -642,7 +642,7 @@ fxp_attach(device_t dev)
}
error = bus_dmamem_alloc(sc->fxp_stag, (void **)&sc->fxp_stats,
- BUS_DMA_NOWAIT, &sc->fxp_smap);
+ BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->fxp_smap);
if (error)
goto fail;
error = bus_dmamap_load(sc->fxp_stag, sc->fxp_smap, sc->fxp_stats,
@@ -651,7 +651,6 @@ fxp_attach(device_t dev)
device_printf(dev, "could not map the stats buffer\n");
goto fail;
}
- bzero(sc->fxp_stats, sizeof(struct fxp_stats));
error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
BUS_SPACE_MAXADDR, NULL, NULL, FXP_TXCB_SZ, 1,
@@ -662,10 +661,9 @@ fxp_attach(device_t dev)
}
error = bus_dmamem_alloc(sc->cbl_tag, (void **)&sc->fxp_desc.cbl_list,
- BUS_DMA_NOWAIT, &sc->cbl_map);
+ BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->cbl_map);
if (error)
goto fail;
- bzero(sc->fxp_desc.cbl_list, FXP_TXCB_SZ);
error = bus_dmamap_load(sc->cbl_tag, sc->cbl_map,
sc->fxp_desc.cbl_list, FXP_TXCB_SZ, fxp_dma_map_addr,
OpenPOWER on IntegriCloud