mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Use the BUS_DMA_ZERO flag.
This commit is contained in:
parent
42e85383ff
commit
aafb3ebbe3
3 changed files with 4 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue