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

This commit is contained in:
Pyun YongHyeon 2011-11-04 20:25:30 +00:00
parent 24a92ae013
commit 5948254c2a

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);