Lines Matching refs:dma_buf

554 	struct hbq_dmabuf *dma_buf;  in lpfc_sli4_rb_alloc()  local
556 dma_buf = kzalloc(sizeof(struct hbq_dmabuf), GFP_KERNEL); in lpfc_sli4_rb_alloc()
557 if (!dma_buf) in lpfc_sli4_rb_alloc()
560 dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL, in lpfc_sli4_rb_alloc()
561 &dma_buf->hbuf.phys); in lpfc_sli4_rb_alloc()
562 if (!dma_buf->hbuf.virt) { in lpfc_sli4_rb_alloc()
563 kfree(dma_buf); in lpfc_sli4_rb_alloc()
566 dma_buf->dbuf.virt = dma_pool_alloc(phba->lpfc_drb_pool, GFP_KERNEL, in lpfc_sli4_rb_alloc()
567 &dma_buf->dbuf.phys); in lpfc_sli4_rb_alloc()
568 if (!dma_buf->dbuf.virt) { in lpfc_sli4_rb_alloc()
569 dma_pool_free(phba->lpfc_hrb_pool, dma_buf->hbuf.virt, in lpfc_sli4_rb_alloc()
570 dma_buf->hbuf.phys); in lpfc_sli4_rb_alloc()
571 kfree(dma_buf); in lpfc_sli4_rb_alloc()
574 dma_buf->total_size = LPFC_DATA_BUF_SIZE; in lpfc_sli4_rb_alloc()
575 return dma_buf; in lpfc_sli4_rb_alloc()
612 struct rqb_dmabuf *dma_buf; in lpfc_sli4_nvmet_alloc() local
614 dma_buf = kzalloc(sizeof(*dma_buf), GFP_KERNEL); in lpfc_sli4_nvmet_alloc()
615 if (!dma_buf) in lpfc_sli4_nvmet_alloc()
618 dma_buf->hbuf.virt = dma_pool_alloc(phba->lpfc_hrb_pool, GFP_KERNEL, in lpfc_sli4_nvmet_alloc()
619 &dma_buf->hbuf.phys); in lpfc_sli4_nvmet_alloc()
620 if (!dma_buf->hbuf.virt) { in lpfc_sli4_nvmet_alloc()
621 kfree(dma_buf); in lpfc_sli4_nvmet_alloc()
624 dma_buf->dbuf.virt = dma_pool_alloc(phba->lpfc_nvmet_drb_pool, in lpfc_sli4_nvmet_alloc()
625 GFP_KERNEL, &dma_buf->dbuf.phys); in lpfc_sli4_nvmet_alloc()
626 if (!dma_buf->dbuf.virt) { in lpfc_sli4_nvmet_alloc()
627 dma_pool_free(phba->lpfc_hrb_pool, dma_buf->hbuf.virt, in lpfc_sli4_nvmet_alloc()
628 dma_buf->hbuf.phys); in lpfc_sli4_nvmet_alloc()
629 kfree(dma_buf); in lpfc_sli4_nvmet_alloc()
632 dma_buf->total_size = LPFC_NVMET_DATA_BUF_SIZE; in lpfc_sli4_nvmet_alloc()
633 return dma_buf; in lpfc_sli4_nvmet_alloc()