aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/amr
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2014-06-13 18:20:44 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2014-06-13 18:20:44 +0000
commitaced5239b239beb4bd419a8dafbde08f809b8585 (patch)
tree0a0f66cb6a86ef083ff47fdb6de973aaea4d9049 /sys/dev/amr
parentb30283c0916ef1c0a5b1dd411cfc4c39bcc1384f (diff)
Notes
Diffstat (limited to 'sys/dev/amr')
-rw-r--r--sys/dev/amr/amr_pci.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c
index 2f11f501284b..81ddc32c7cde 100644
--- a/sys/dev/amr/amr_pci.c
+++ b/sys/dev/amr/amr_pci.c
@@ -477,20 +477,25 @@ amr_pci_free(struct amr_softc *sc)
bus_dma_tag_destroy(sc->amr_buffer64_dmat);
/* free and destroy DMA memory and tag for passthrough pool */
- if (sc->amr_ccb)
+ if (sc->amr_ccb) {
+ bus_dmamap_unload(sc->amr_ccb_dmat, sc->amr_ccb_dmamap);
bus_dmamem_free(sc->amr_ccb_dmat, sc->amr_ccb, sc->amr_ccb_dmamap);
+ }
if (sc->amr_ccb_dmat)
bus_dma_tag_destroy(sc->amr_ccb_dmat);
/* free and destroy DMA memory and tag for s/g lists */
- if (sc->amr_sgtable)
+ if (sc->amr_sgtable) {
+ bus_dmamap_unload(sc->amr_sg_dmat, sc->amr_sg_dmamap);
bus_dmamem_free(sc->amr_sg_dmat, sc->amr_sgtable, sc->amr_sg_dmamap);
+ }
if (sc->amr_sg_dmat)
bus_dma_tag_destroy(sc->amr_sg_dmat);
/* free and destroy DMA memory and tag for mailbox */
p = (void *)(uintptr_t)(volatile void *)sc->amr_mailbox64;
if (sc->amr_mailbox) {
+ bus_dmamap_unload(sc->amr_mailbox_dmat, sc->amr_mailbox_dmamap);
bus_dmamem_free(sc->amr_mailbox_dmat, p, sc->amr_mailbox_dmamap);
}
if (sc->amr_mailbox_dmat)