Make sure to unload loaded DMA area(descriptor, command, event ring).

This commit is contained in:
yongari 2011-11-04 20:25:30 +00:00
parent 71aa39a47b
commit f6e77a8a74

View File

@ -2522,6 +2522,8 @@ ti_detach(device_t dev)
bus_dma_tag_destroy(sc->ti_mbuftx_dmat);
if (sc->ti_mbufrx_dmat)
bus_dma_tag_destroy(sc->ti_mbufrx_dmat);
if (sc->ti_rdata && sc->ti_rdata_dmamap)
bus_dmamap_unload(sc->ti_rdata_dmat, sc->ti_rdata_dmamap);
if (sc->ti_rdata)
bus_dmamem_free(sc->ti_rdata_dmat, sc->ti_rdata,
sc->ti_rdata_dmamap);