Unload maps for DMA buffers allocated via bus_dmamem_alloc() before
freeing the buffers. Reviewed by: davidcs
This commit is contained in:
parent
91342c6607
commit
aeeb653ce0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=267375
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user