mirror of
https://github.com/opnsense/src.git
synced 2026-04-02 16:05:17 -04:00
Use the BUS_DMA_ZERO flag instead of bzero()'ing DMA memory.
This commit is contained in:
parent
d5afecd068
commit
42e85383ff
1 changed files with 2 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue