Don't bother clearing maps for static DMA allocations to NULL. Instead,
leave them as purely opaque values that are only set by bus_dmamem_alloc().
This commit is contained in:
parent
62a8e14786
commit
de01564f85
@ -671,7 +671,6 @@ ate_deactivate(struct ate_softc *sc)
|
||||
bus_dmamem_free(sc->rx_tag, sc->rx_buf[i],
|
||||
sc->rx_map[i]);
|
||||
sc->rx_buf[i] = NULL;
|
||||
sc->rx_map[i] = NULL;
|
||||
}
|
||||
bus_dma_tag_destroy(sc->rx_tag);
|
||||
}
|
||||
|
@ -1394,14 +1394,12 @@ ahci_dmafini(device_t dev)
|
||||
bus_dmamap_unload(ch->dma.rfis_tag, ch->dma.rfis_map);
|
||||
bus_dmamem_free(ch->dma.rfis_tag, ch->dma.rfis, ch->dma.rfis_map);
|
||||
ch->dma.rfis_bus = 0;
|
||||
ch->dma.rfis_map = NULL;
|
||||
ch->dma.rfis = NULL;
|
||||
}
|
||||
if (ch->dma.work_bus) {
|
||||
bus_dmamap_unload(ch->dma.work_tag, ch->dma.work_map);
|
||||
bus_dmamem_free(ch->dma.work_tag, ch->dma.work, ch->dma.work_map);
|
||||
ch->dma.work_bus = 0;
|
||||
ch->dma.work_map = NULL;
|
||||
ch->dma.work = NULL;
|
||||
}
|
||||
if (ch->dma.work_tag) {
|
||||
|
@ -132,7 +132,6 @@ ata_dmafini(device_t dev)
|
||||
bus_dmamap_unload(ch->dma.work_tag, ch->dma.work_map);
|
||||
bus_dmamem_free(ch->dma.work_tag, ch->dma.work, ch->dma.work_map);
|
||||
ch->dma.work_bus = 0;
|
||||
ch->dma.work_map = NULL;
|
||||
ch->dma.work = NULL;
|
||||
}
|
||||
if (ch->dma.work_tag) {
|
||||
|
@ -4473,7 +4473,6 @@ tulip_busdma_freering(tulip_ringinfo_t *ri)
|
||||
}
|
||||
if (ri->ri_descs != NULL) {
|
||||
bus_dmamem_free(ri->ri_ring_tag, ri->ri_descs, ri->ri_ring_map);
|
||||
ri->ri_ring_map = NULL;
|
||||
ri->ri_descs = NULL;
|
||||
}
|
||||
if (ri->ri_ring_tag != NULL) {
|
||||
@ -4558,7 +4557,6 @@ tulip_busdma_cleanup(tulip_softc_t * const sc)
|
||||
if (sc->tulip_setupbuf != NULL) {
|
||||
bus_dmamem_free(sc->tulip_setup_tag, sc->tulip_setupbuf,
|
||||
sc->tulip_setup_map);
|
||||
sc->tulip_setup_map = NULL;
|
||||
sc->tulip_setupbuf = NULL;
|
||||
}
|
||||
if (sc->tulip_setup_tag != NULL) {
|
||||
|
@ -402,7 +402,6 @@ mvs_dmafini(device_t dev)
|
||||
bus_dmamem_free(ch->dma.workrp_tag,
|
||||
ch->dma.workrp, ch->dma.workrp_map);
|
||||
ch->dma.workrp_bus = 0;
|
||||
ch->dma.workrp_map = NULL;
|
||||
ch->dma.workrp = NULL;
|
||||
}
|
||||
if (ch->dma.workrp_tag) {
|
||||
@ -414,7 +413,6 @@ mvs_dmafini(device_t dev)
|
||||
bus_dmamem_free(ch->dma.workrq_tag,
|
||||
ch->dma.workrq, ch->dma.workrq_map);
|
||||
ch->dma.workrq_bus = 0;
|
||||
ch->dma.workrq_map = NULL;
|
||||
ch->dma.workrq = NULL;
|
||||
}
|
||||
if (ch->dma.workrq_tag) {
|
||||
|
@ -1410,7 +1410,6 @@ nfe_free_rx_ring(struct nfe_softc *sc, struct nfe_rx_ring *ring)
|
||||
bus_dmamem_free(ring->rx_desc_tag, desc, ring->rx_desc_map);
|
||||
ring->desc64 = NULL;
|
||||
ring->desc32 = NULL;
|
||||
ring->rx_desc_map = NULL;
|
||||
}
|
||||
if (ring->rx_desc_tag != NULL) {
|
||||
bus_dma_tag_destroy(ring->rx_desc_tag);
|
||||
@ -1464,7 +1463,6 @@ nfe_free_jrx_ring(struct nfe_softc *sc, struct nfe_jrx_ring *ring)
|
||||
bus_dmamem_free(ring->jrx_desc_tag, desc, ring->jrx_desc_map);
|
||||
ring->jdesc64 = NULL;
|
||||
ring->jdesc32 = NULL;
|
||||
ring->jrx_desc_map = NULL;
|
||||
}
|
||||
|
||||
if (ring->jrx_desc_tag != NULL) {
|
||||
@ -1626,7 +1624,6 @@ nfe_free_tx_ring(struct nfe_softc *sc, struct nfe_tx_ring *ring)
|
||||
bus_dmamem_free(ring->tx_desc_tag, desc, ring->tx_desc_map);
|
||||
ring->desc64 = NULL;
|
||||
ring->desc32 = NULL;
|
||||
ring->tx_desc_map = NULL;
|
||||
bus_dma_tag_destroy(ring->tx_desc_tag);
|
||||
ring->tx_desc_tag = NULL;
|
||||
}
|
||||
|
@ -406,7 +406,6 @@ xge_os_dma_free(pci_dev_h pdev, const void *vaddr, int size,
|
||||
XGE_OS_MEMORY_CHECK_FREE(p_dmah->dma_viraddr, size);
|
||||
bus_dmamem_free(p_dmah->dma_tag, p_dmah->dma_viraddr, p_dmah->dma_map);
|
||||
bus_dma_tag_destroy(p_dmah->dma_tag);
|
||||
p_dmah->dma_map = NULL;
|
||||
p_dmah->dma_tag = NULL;
|
||||
p_dmah->dma_viraddr = NULL;
|
||||
return;
|
||||
|
@ -615,7 +615,6 @@ vxge_dma_free(pci_dev_h pdev, const void *vaddr, u_long size,
|
||||
bus_dmamem_free(p_dmah->dma_tag, p_dmah->dma_vaddr, p_dmah->dma_map);
|
||||
bus_dma_tag_destroy(p_dmah->dma_tag);
|
||||
|
||||
p_dmah->dma_map = NULL;
|
||||
p_dmah->dma_tag = NULL;
|
||||
p_dmah->dma_vaddr = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user