summaryrefslogtreecommitdiffstats
path: root/sys/dev/ti
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2011-11-04 20:25:30 +0000
committeryongari <yongari@FreeBSD.org>2011-11-04 20:25:30 +0000
commitf6e77a8a74a860943f17f55f25ec0c53354f4f9e (patch)
tree42ac66759382db6289cbec60477fbe598ea63dfd /sys/dev/ti
parent71aa39a47b82d48a9255b29a05fc250c40f4ed51 (diff)
downloadFreeBSD-src-f6e77a8a74a860943f17f55f25ec0c53354f4f9e.zip
FreeBSD-src-f6e77a8a74a860943f17f55f25ec0c53354f4f9e.tar.gz
Make sure to unload loaded DMA area(descriptor, command, event ring).
Diffstat (limited to 'sys/dev/ti')
-rw-r--r--sys/dev/ti/if_ti.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index bb33e25..4c24ad9 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -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);
OpenPOWER on IntegriCloud