Date: Wed, 11 Jun 2014 20:44:03 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267375 - in head/sys/dev: qlxgb qlxgbe qlxge Message-ID: <201406112044.s5BKi3U6088813@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed Jun 11 20:44:02 2014 New Revision: 267375 URL: http://svnweb.freebsd.org/changeset/base/267375 Log: Unload maps for DMA buffers allocated via bus_dmamem_alloc() before freeing the buffers. Reviewed by: davidcs Modified: head/sys/dev/qlxgb/qla_os.c head/sys/dev/qlxgbe/ql_os.c head/sys/dev/qlxge/qls_os.c Modified: head/sys/dev/qlxgb/qla_os.c ============================================================================== --- head/sys/dev/qlxgb/qla_os.c Wed Jun 11 20:38:14 2014 (r267374) +++ head/sys/dev/qlxgb/qla_os.c Wed Jun 11 20:44:02 2014 (r267375) @@ -602,6 +602,7 @@ qla_alloc_dmabuf_exit: 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); } Modified: head/sys/dev/qlxgbe/ql_os.c ============================================================================== --- head/sys/dev/qlxgbe/ql_os.c Wed Jun 11 20:38:14 2014 (r267374) +++ head/sys/dev/qlxgbe/ql_os.c Wed Jun 11 20:44:02 2014 (r267375) @@ -681,6 +681,7 @@ ql_alloc_dmabuf_exit: 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); } Modified: head/sys/dev/qlxge/qls_os.c ============================================================================== --- head/sys/dev/qlxge/qls_os.c Wed Jun 11 20:38:14 2014 (r267374) +++ head/sys/dev/qlxge/qls_os.c Wed Jun 11 20:44:02 2014 (r267375) @@ -670,6 +670,7 @@ qls_alloc_dmabuf_exit: 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406112044.s5BKi3U6088813>