Lines Matching refs:dma
105 vmxnet3_alloc_dma_mem(vmxnet3_softc_t *dp, vmxnet3_dmabuf_t *dma, size_t size, in vmxnet3_alloc_dma_mem() argument
119 &dma->dmaHandle)) != DDI_SUCCESS) { in vmxnet3_alloc_dma_mem()
128 if (ddi_dma_mem_alloc(dma->dmaHandle, size, &vmxnet3_dev_attr, in vmxnet3_alloc_dma_mem()
129 DDI_DMA_CONSISTENT, cb, NULL, &dma->buf, &dma->bufLen, in vmxnet3_alloc_dma_mem()
130 &dma->dataHandle) != DDI_SUCCESS) { in vmxnet3_alloc_dma_mem()
139 if ((dmaerr = ddi_dma_addr_bind_handle(dma->dmaHandle, NULL, dma->buf, in vmxnet3_alloc_dma_mem()
140 dma->bufLen, DDI_DMA_RDWR | DDI_DMA_STREAMING, cb, NULL, &cookie, in vmxnet3_alloc_dma_mem()
149 dma->bufPA = cookie.dmac_laddress; in vmxnet3_alloc_dma_mem()
154 ddi_dma_mem_free(&dma->dataHandle); in vmxnet3_alloc_dma_mem()
156 ddi_dma_free_handle(&dma->dmaHandle); in vmxnet3_alloc_dma_mem()
158 dma->buf = NULL; in vmxnet3_alloc_dma_mem()
159 dma->bufPA = 0; in vmxnet3_alloc_dma_mem()
160 dma->bufLen = 0; in vmxnet3_alloc_dma_mem()
165 vmxnet3_alloc_dma_mem_1(vmxnet3_softc_t *dp, vmxnet3_dmabuf_t *dma, size_t size, in vmxnet3_alloc_dma_mem_1() argument
168 return (vmxnet3_alloc_dma_mem(dp, dma, size, canSleep, in vmxnet3_alloc_dma_mem_1()
173 vmxnet3_alloc_dma_mem_512(vmxnet3_softc_t *dp, vmxnet3_dmabuf_t *dma, in vmxnet3_alloc_dma_mem_512() argument
176 return (vmxnet3_alloc_dma_mem(dp, dma, size, canSleep, in vmxnet3_alloc_dma_mem_512()
181 vmxnet3_alloc_dma_mem_128(vmxnet3_softc_t *dp, vmxnet3_dmabuf_t *dma, in vmxnet3_alloc_dma_mem_128() argument
184 return (vmxnet3_alloc_dma_mem(dp, dma, size, canSleep, in vmxnet3_alloc_dma_mem_128()
192 vmxnet3_free_dma_mem(vmxnet3_dmabuf_t *dma) in vmxnet3_free_dma_mem() argument
194 (void) ddi_dma_unbind_handle(dma->dmaHandle); in vmxnet3_free_dma_mem()
195 ddi_dma_mem_free(&dma->dataHandle); in vmxnet3_free_dma_mem()
196 ddi_dma_free_handle(&dma->dmaHandle); in vmxnet3_free_dma_mem()
198 dma->buf = NULL; in vmxnet3_free_dma_mem()
199 dma->bufPA = 0; in vmxnet3_free_dma_mem()
200 dma->bufLen = 0; in vmxnet3_free_dma_mem()