Lines Matching refs:sglist
3141 struct scatterlist *sglist; in pmcraid_build_ioadl() local
3173 scsi_for_each_sg(scsi_cmd, sglist, nseg, i) { in pmcraid_build_ioadl()
3174 ioadl[i].data_len = cpu_to_le32(sg_dma_len(sglist)); in pmcraid_build_ioadl()
3175 ioadl[i].address = cpu_to_le64(sg_dma_address(sglist)); in pmcraid_build_ioadl()
3193 static void pmcraid_free_sglist(struct pmcraid_sglist *sglist) in pmcraid_free_sglist() argument
3195 sgl_free_order(sglist->scatterlist, sglist->order); in pmcraid_free_sglist()
3196 kfree(sglist); in pmcraid_free_sglist()
3211 struct pmcraid_sglist *sglist; in pmcraid_alloc_sglist() local
3219 sglist = kzalloc(sizeof(struct pmcraid_sglist), GFP_KERNEL); in pmcraid_alloc_sglist()
3220 if (sglist == NULL) in pmcraid_alloc_sglist()
3223 sglist->order = order; in pmcraid_alloc_sglist()
3225 GFP_KERNEL | GFP_DMA | __GFP_ZERO, &sglist->num_sg); in pmcraid_alloc_sglist()
3227 return sglist; in pmcraid_alloc_sglist()
3243 struct pmcraid_sglist *sglist, in pmcraid_copy_sglist() argument
3256 bsize_elem = PAGE_SIZE * (1 << sglist->order); in pmcraid_copy_sglist()
3258 sg = sglist->scatterlist; in pmcraid_copy_sglist()
3476 struct pmcraid_sglist *sglist = NULL; in pmcraid_build_passthrough_ioadls() local
3482 sglist = pmcraid_alloc_sglist(buflen); in pmcraid_build_passthrough_ioadls()
3484 if (!sglist) { in pmcraid_build_passthrough_ioadls()
3489 sglist->num_dma_sg = dma_map_sg(&cmd->drv_inst->pdev->dev, in pmcraid_build_passthrough_ioadls()
3490 sglist->scatterlist, in pmcraid_build_passthrough_ioadls()
3491 sglist->num_sg, direction); in pmcraid_build_passthrough_ioadls()
3493 if (!sglist->num_dma_sg || sglist->num_dma_sg > PMCRAID_MAX_IOADLS) { in pmcraid_build_passthrough_ioadls()
3496 pmcraid_free_sglist(sglist); in pmcraid_build_passthrough_ioadls()
3500 cmd->sglist = sglist; in pmcraid_build_passthrough_ioadls()
3503 ioadl = pmcraid_init_ioadls(cmd, sglist->num_dma_sg); in pmcraid_build_passthrough_ioadls()
3506 for_each_sg(sglist->scatterlist, sg, sglist->num_dma_sg, i) { in pmcraid_build_passthrough_ioadls()
3535 struct pmcraid_sglist *sglist = cmd->sglist; in pmcraid_release_passthrough_ioadls() local
3539 sglist->scatterlist, in pmcraid_release_passthrough_ioadls()
3540 sglist->num_sg, in pmcraid_release_passthrough_ioadls()
3542 pmcraid_free_sglist(sglist); in pmcraid_release_passthrough_ioadls()
3543 cmd->sglist = NULL; in pmcraid_release_passthrough_ioadls()
3694 rc = pmcraid_copy_sglist(cmd->sglist, in pmcraid_ioctl_passthrough()
3792 rc = pmcraid_copy_sglist(cmd->sglist, in pmcraid_ioctl_passthrough()