summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/dc/if_dc.c3
-rw-r--r--sys/dev/fxp/if_fxp.c6
-rw-r--r--sys/pci/if_dc.c3
3 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 7e7ebd3..7013a6c 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -2131,7 +2131,7 @@ dc_attach(device_t dev)
goto fail;
}
error = bus_dmamem_alloc(sc->dc_ltag, (void **)&sc->dc_ldata,
- BUS_DMA_NOWAIT, &sc->dc_lmap);
+ BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->dc_lmap);
if (error) {
printf("dc%d: failed to allocate DMA safe memory\n", unit);
error = ENXIO;
@@ -2145,7 +2145,6 @@ dc_attach(device_t dev)
error = ENXIO;
goto fail;
}
- bzero(sc->dc_ldata, sizeof(struct dc_list_data));
/*
* Allocate a busdma tag and DMA safe memory for the multicast
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,
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index 7e7ebd3..7013a6c 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -2131,7 +2131,7 @@ dc_attach(device_t dev)
goto fail;
}
error = bus_dmamem_alloc(sc->dc_ltag, (void **)&sc->dc_ldata,
- BUS_DMA_NOWAIT, &sc->dc_lmap);
+ BUS_DMA_NOWAIT | BUS_DMA_ZERO, &sc->dc_lmap);
if (error) {
printf("dc%d: failed to allocate DMA safe memory\n", unit);
error = ENXIO;
@@ -2145,7 +2145,6 @@ dc_attach(device_t dev)
error = ENXIO;
goto fail;
}
- bzero(sc->dc_ldata, sizeof(struct dc_list_data));
/*
* Allocate a busdma tag and DMA safe memory for the multicast
OpenPOWER on IntegriCloud