Lines Matching refs:mem_desc
1140 struct dma_memory_desc *mem_desc; in mpi3mr_free_ioctl_dma_memory() local
1147 mem_desc = &mrioc->ioctl_sge[i]; in mpi3mr_free_ioctl_dma_memory()
1148 if (mem_desc->addr) { in mpi3mr_free_ioctl_dma_memory()
1150 mem_desc->addr, in mpi3mr_free_ioctl_dma_memory()
1151 mem_desc->dma_addr); in mpi3mr_free_ioctl_dma_memory()
1152 mem_desc->addr = NULL; in mpi3mr_free_ioctl_dma_memory()
1157 mem_desc = &mrioc->ioctl_chain_sge; in mpi3mr_free_ioctl_dma_memory()
1159 if (mem_desc->addr) { in mpi3mr_free_ioctl_dma_memory()
1160 dma_free_coherent(&mrioc->pdev->dev, mem_desc->size, in mpi3mr_free_ioctl_dma_memory()
1161 mem_desc->addr, mem_desc->dma_addr); in mpi3mr_free_ioctl_dma_memory()
1162 mem_desc->addr = NULL; in mpi3mr_free_ioctl_dma_memory()
1164 mem_desc = &mrioc->ioctl_resp_sge; in mpi3mr_free_ioctl_dma_memory()
1165 if (mem_desc->addr) { in mpi3mr_free_ioctl_dma_memory()
1166 dma_free_coherent(&mrioc->pdev->dev, mem_desc->size, in mpi3mr_free_ioctl_dma_memory()
1167 mem_desc->addr, mem_desc->dma_addr); in mpi3mr_free_ioctl_dma_memory()
1168 mem_desc->addr = NULL; in mpi3mr_free_ioctl_dma_memory()
1186 struct dma_memory_desc *mem_desc; in mpi3mr_alloc_ioctl_dma_memory() local
1200 mem_desc = &mrioc->ioctl_sge[i]; in mpi3mr_alloc_ioctl_dma_memory()
1201 mem_desc->size = MPI3MR_IOCTL_SGE_SIZE; in mpi3mr_alloc_ioctl_dma_memory()
1202 mem_desc->addr = dma_pool_zalloc(mrioc->ioctl_dma_pool, in mpi3mr_alloc_ioctl_dma_memory()
1204 &mem_desc->dma_addr); in mpi3mr_alloc_ioctl_dma_memory()
1205 if (!mem_desc->addr) in mpi3mr_alloc_ioctl_dma_memory()
1209 mem_desc = &mrioc->ioctl_chain_sge; in mpi3mr_alloc_ioctl_dma_memory()
1210 mem_desc->size = MPI3MR_PAGE_SIZE_4K; in mpi3mr_alloc_ioctl_dma_memory()
1211 mem_desc->addr = dma_alloc_coherent(&mrioc->pdev->dev, in mpi3mr_alloc_ioctl_dma_memory()
1212 mem_desc->size, in mpi3mr_alloc_ioctl_dma_memory()
1213 &mem_desc->dma_addr, in mpi3mr_alloc_ioctl_dma_memory()
1215 if (!mem_desc->addr) in mpi3mr_alloc_ioctl_dma_memory()
1218 mem_desc = &mrioc->ioctl_resp_sge; in mpi3mr_alloc_ioctl_dma_memory()
1219 mem_desc->size = MPI3MR_PAGE_SIZE_4K; in mpi3mr_alloc_ioctl_dma_memory()
1220 mem_desc->addr = dma_alloc_coherent(&mrioc->pdev->dev, in mpi3mr_alloc_ioctl_dma_memory()
1221 mem_desc->size, in mpi3mr_alloc_ioctl_dma_memory()
1222 &mem_desc->dma_addr, in mpi3mr_alloc_ioctl_dma_memory()
1224 if (!mem_desc->addr) in mpi3mr_alloc_ioctl_dma_memory()
5616 struct dma_memory_desc mem_desc; in mpi3mr_process_cfg_req() local
5621 memset(&mem_desc, 0, sizeof(struct dma_memory_desc)); in mpi3mr_process_cfg_req()
5624 mem_desc.size = sizeof(struct mpi3_config_page_header); in mpi3mr_process_cfg_req()
5656 mem_desc.size = le16_to_cpu(cfg_hdr->page_length) * 4; in mpi3mr_process_cfg_req()
5661 mem_desc.addr = dma_alloc_coherent(&mrioc->pdev->dev, in mpi3mr_process_cfg_req()
5662 mem_desc.size, &mem_desc.dma_addr, GFP_KERNEL); in mpi3mr_process_cfg_req()
5664 if (!mem_desc.addr) in mpi3mr_process_cfg_req()
5667 mpi3mr_add_sg_single(&cfg_req->sgl, sgl_flags, mem_desc.size, in mpi3mr_process_cfg_req()
5668 mem_desc.dma_addr); in mpi3mr_process_cfg_req()
5672 memcpy(mem_desc.addr, cfg_buf, min_t(u16, mem_desc.size, in mpi3mr_process_cfg_req()
5676 dprint_dump(mem_desc.addr, mem_desc.size, "cfg_buf"); in mpi3mr_process_cfg_req()
5686 memcpy(cfg_buf, mem_desc.addr, min_t(u16, mem_desc.size, in mpi3mr_process_cfg_req()
5690 dprint_dump(mem_desc.addr, mem_desc.size, "cfg_buf"); in mpi3mr_process_cfg_req()
5694 if (mem_desc.addr) { in mpi3mr_process_cfg_req()
5695 dma_free_coherent(&mrioc->pdev->dev, mem_desc.size, in mpi3mr_process_cfg_req()
5696 mem_desc.addr, mem_desc.dma_addr); in mpi3mr_process_cfg_req()
5697 mem_desc.addr = NULL; in mpi3mr_process_cfg_req()