Unload maps for DMA buffers allocated via bus_dmamem_alloc() before

freeing the buffers.

Reviewed by:	davidcs
This commit is contained in:
John Baldwin 2014-06-11 20:44:02 +00:00
parent 91342c6607
commit aeeb653ce0
3 changed files with 3 additions and 0 deletions

View File

@ -602,6 +602,7 @@ qla_alloc_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf)
void
qla_free_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf)
{
bus_dmamap_unload(dma_buf->dma_tag, dma_buf->dma_map);
bus_dmamem_free(dma_buf->dma_tag, dma_buf->dma_b, dma_buf->dma_map);
bus_dma_tag_destroy(dma_buf->dma_tag);
}

View File

@ -681,6 +681,7 @@ ql_alloc_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf)
void
ql_free_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf)
{
bus_dmamap_unload(dma_buf->dma_tag, dma_buf->dma_map);
bus_dmamem_free(dma_buf->dma_tag, dma_buf->dma_b, dma_buf->dma_map);
bus_dma_tag_destroy(dma_buf->dma_tag);
}

View File

@ -670,6 +670,7 @@ qls_alloc_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf)
void
qls_free_dmabuf(qla_host_t *ha, qla_dma_t *dma_buf)
{
bus_dmamap_unload(dma_buf->dma_tag, dma_buf->dma_map);
bus_dmamem_free(dma_buf->dma_tag, dma_buf->dma_b, dma_buf->dma_map);
bus_dma_tag_destroy(dma_buf->dma_tag);
}