diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/amr/amr_pci.c | 9 | ||||
-rw-r--r-- | sys/dev/drm/ati_pcigart.c | 1 | ||||
-rw-r--r-- | sys/dev/drm/drm_pci.c | 1 | ||||
-rw-r--r-- | sys/dev/drm2/drm_pci.c | 1 | ||||
-rw-r--r-- | sys/dev/isp/isp_pci.c | 3 | ||||
-rw-r--r-- | sys/dev/mlx/mlx.c | 7 |
6 files changed, 20 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) diff --git a/sys/dev/drm/ati_pcigart.c b/sys/dev/drm/ati_pcigart.c index 063288ed64d6..2c50e8bd3aab 100644 --- a/sys/dev/drm/ati_pcigart.c +++ b/sys/dev/drm/ati_pcigart.c @@ -116,6 +116,7 @@ drm_ati_free_pcigart_table(struct drm_device *dev, { struct drm_dma_handle *dmah = gart_info->dmah; + bus_dmamap_unload(dmah->tag, dmah->map); bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); bus_dma_tag_destroy(dmah->tag); free(dmah, DRM_MEM_DMA); diff --git a/sys/dev/drm/drm_pci.c b/sys/dev/drm/drm_pci.c index afd66047f216..3d9a6f4a2b76 100644 --- a/sys/dev/drm/drm_pci.c +++ b/sys/dev/drm/drm_pci.c @@ -119,6 +119,7 @@ drm_pci_free(struct drm_device *dev, drm_dma_handle_t *dmah) if (dmah == NULL) return; + bus_dmamap_unload(dmah->tag, dmah->map); bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); bus_dma_tag_destroy(dmah->tag); diff --git a/sys/dev/drm2/drm_pci.c b/sys/dev/drm2/drm_pci.c index ac9d4e6be985..50af71da1199 100644 --- a/sys/dev/drm2/drm_pci.c +++ b/sys/dev/drm2/drm_pci.c @@ -116,6 +116,7 @@ drm_pci_free(struct drm_device *dev, drm_dma_handle_t *dmah) if (dmah == NULL) return; + bus_dmamap_unload(dmah->tag, dmah->map); bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); bus_dma_tag_destroy(dmah->tag); diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 86c5a1db75b2..2c6ee89892e5 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -1741,6 +1741,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) bad: while (--cmap >= 0) { struct isp_fc *fc = ISP_FC_PC(isp, cmap); + bus_dmamap_unload(fc->tdmat, fc->tdmap); bus_dmamem_free(fc->tdmat, base, fc->tdmap); bus_dma_tag_destroy(fc->tdmat); while (fc->nexus_free_list) { @@ -1749,6 +1750,8 @@ bad: free(n, M_DEVBUF); } } + if (isp->isp_rquest_dma != 0) + bus_dmamap_unload(isp->isp_osinfo.cdmat, isp->isp_osinfo.cdmap); bus_dmamem_free(isp->isp_osinfo.cdmat, base, isp->isp_osinfo.cdmap); bus_dma_tag_destroy(isp->isp_osinfo.cdmat); free(isp->isp_xflist, M_DEVBUF); diff --git a/sys/dev/mlx/mlx.c b/sys/dev/mlx/mlx.c index ddcf4b0598bc..0f92eaf35385 100644 --- a/sys/dev/mlx/mlx.c +++ b/sys/dev/mlx/mlx.c @@ -191,6 +191,8 @@ mlx_free(struct mlx_softc *sc) bus_dma_tag_destroy(sc->mlx_buffer_dmat); /* free and destroy DMA memory and tag for s/g lists */ + if (sc->mlx_sgbusaddr) + bus_dmamap_unload(sc->mlx_sg_dmat, sc->mlx_sg_dmamap); if (sc->mlx_sgtable) bus_dmamem_free(sc->mlx_sg_dmat, sc->mlx_sgtable, sc->mlx_sg_dmamap); if (sc->mlx_sg_dmat) @@ -239,10 +241,15 @@ mlx_sglist_map(struct mlx_softc *sc) debug_called(1); /* destroy any existing mappings */ + if (sc->mlx_sgbusaddr) + bus_dmamap_unload(sc->mlx_sg_dmat, sc->mlx_sg_dmamap); if (sc->mlx_sgtable) bus_dmamem_free(sc->mlx_sg_dmat, sc->mlx_sgtable, sc->mlx_sg_dmamap); if (sc->mlx_sg_dmat) bus_dma_tag_destroy(sc->mlx_sg_dmat); + sc->mlx_sgbusaddr = 0; + sc->mlx_sgtable = NULL; + sc->mlx_sg_dmat = NULL; /* * Create a single tag describing a region large enough to hold all of |