Lines Matching refs:dma_mem
210 struct idpf_dma_mem *dma_mem; in idpf_mb_clean() local
224 dma_mem = q_msg[i]->ctx.indirect.payload; in idpf_mb_clean()
225 if (dma_mem) in idpf_mb_clean()
226 dma_free_coherent(&adapter->pdev->dev, dma_mem->size, in idpf_mb_clean()
227 dma_mem->va, dma_mem->pa); in idpf_mb_clean()
229 kfree(dma_mem); in idpf_mb_clean()
254 struct idpf_dma_mem *dma_mem; in idpf_send_mb_msg() local
273 dma_mem = kzalloc(sizeof(*dma_mem), GFP_ATOMIC); in idpf_send_mb_msg()
274 if (!dma_mem) { in idpf_send_mb_msg()
284 dma_mem->size = IDPF_CTLQ_MAX_BUF_LEN; in idpf_send_mb_msg()
285 dma_mem->va = dma_alloc_coherent(&adapter->pdev->dev, dma_mem->size, in idpf_send_mb_msg()
286 &dma_mem->pa, GFP_ATOMIC); in idpf_send_mb_msg()
287 if (!dma_mem->va) { in idpf_send_mb_msg()
294 memcpy(dma_mem->va, msg, msg_size); in idpf_send_mb_msg()
295 ctlq_msg->ctx.indirect.payload = dma_mem; in idpf_send_mb_msg()
305 dma_free_coherent(&adapter->pdev->dev, dma_mem->size, dma_mem->va, in idpf_send_mb_msg()
306 dma_mem->pa); in idpf_send_mb_msg()
308 kfree(dma_mem); in idpf_send_mb_msg()
697 struct idpf_dma_mem *dma_mem; in idpf_recv_mb_msg() local
711 dma_mem = ctlq_msg.ctx.indirect.payload; in idpf_recv_mb_msg()
713 dma_mem = NULL; in idpf_recv_mb_msg()
724 &num_recv, &dma_mem); in idpf_recv_mb_msg()
728 if (dma_mem) in idpf_recv_mb_msg()
730 dma_mem->size, dma_mem->va, in idpf_recv_mb_msg()
731 dma_mem->pa); in idpf_recv_mb_msg()