Lines Matching refs:sglist
3769 struct ipr_sglist *sglist; in ipr_alloc_ucode_buffer() local
3778 sglist = kzalloc(sizeof(struct ipr_sglist), GFP_KERNEL); in ipr_alloc_ucode_buffer()
3779 if (sglist == NULL) { in ipr_alloc_ucode_buffer()
3783 sglist->order = order; in ipr_alloc_ucode_buffer()
3784 sglist->scatterlist = sgl_alloc_order(buf_len, order, false, GFP_KERNEL, in ipr_alloc_ucode_buffer()
3785 &sglist->num_sg); in ipr_alloc_ucode_buffer()
3786 if (!sglist->scatterlist) { in ipr_alloc_ucode_buffer()
3787 kfree(sglist); in ipr_alloc_ucode_buffer()
3791 return sglist; in ipr_alloc_ucode_buffer()
3804 static void ipr_free_ucode_buffer(struct ipr_sglist *sglist) in ipr_free_ucode_buffer() argument
3806 sgl_free_order(sglist->scatterlist, sglist->order); in ipr_free_ucode_buffer()
3807 kfree(sglist); in ipr_free_ucode_buffer()
3822 static int ipr_copy_ucode_buffer(struct ipr_sglist *sglist, in ipr_copy_ucode_buffer() argument
3829 bsize_elem = PAGE_SIZE * (1 << sglist->order); in ipr_copy_ucode_buffer()
3831 sg = sglist->scatterlist; in ipr_copy_ucode_buffer()
3855 sglist->buffer_len = len; in ipr_copy_ucode_buffer()
3868 struct ipr_sglist *sglist) in ipr_build_ucode_ioadl64() argument
3872 struct scatterlist *scatterlist = sglist->scatterlist; in ipr_build_ucode_ioadl64()
3876 ipr_cmd->dma_use_sg = sglist->num_dma_sg; in ipr_build_ucode_ioadl64()
3878 ioarcb->data_transfer_length = cpu_to_be32(sglist->buffer_len); in ipr_build_ucode_ioadl64()
3900 struct ipr_sglist *sglist) in ipr_build_ucode_ioadl() argument
3904 struct scatterlist *scatterlist = sglist->scatterlist; in ipr_build_ucode_ioadl()
3908 ipr_cmd->dma_use_sg = sglist->num_dma_sg; in ipr_build_ucode_ioadl()
3910 ioarcb->data_transfer_length = cpu_to_be32(sglist->buffer_len); in ipr_build_ucode_ioadl()
3937 struct ipr_sglist *sglist) in ipr_update_ioa_ucode() argument
3955 sglist->num_dma_sg = dma_map_sg(&ioa_cfg->pdev->dev, in ipr_update_ioa_ucode()
3956 sglist->scatterlist, sglist->num_sg, in ipr_update_ioa_ucode()
3959 if (!sglist->num_dma_sg) { in ipr_update_ioa_ucode()
3966 ioa_cfg->ucode_sglist = sglist; in ipr_update_ioa_ucode()
3997 struct ipr_sglist *sglist; in ipr_store_update_fw() local
4021 sglist = ipr_alloc_ucode_buffer(dnld_size); in ipr_store_update_fw()
4023 if (!sglist) { in ipr_store_update_fw()
4029 result = ipr_copy_ucode_buffer(sglist, src, dnld_size); in ipr_store_update_fw()
4039 result = ipr_update_ioa_ucode(ioa_cfg, sglist); in ipr_store_update_fw()
4044 ipr_free_ucode_buffer(sglist); in ipr_store_update_fw()
8338 struct ipr_sglist *sglist = ioa_cfg->ucode_sglist; in ipr_reset_ucode_download_done() local
8340 dma_unmap_sg(&ioa_cfg->pdev->dev, sglist->scatterlist, in ipr_reset_ucode_download_done()
8341 sglist->num_sg, DMA_TO_DEVICE); in ipr_reset_ucode_download_done()
8360 struct ipr_sglist *sglist = ioa_cfg->ucode_sglist; in ipr_reset_ucode_download() local
8365 if (!sglist) in ipr_reset_ucode_download()
8372 ipr_cmd->ioarcb.cmd_pkt.cdb[6] = (sglist->buffer_len & 0xff0000) >> 16; in ipr_reset_ucode_download()
8373 ipr_cmd->ioarcb.cmd_pkt.cdb[7] = (sglist->buffer_len & 0x00ff00) >> 8; in ipr_reset_ucode_download()
8374 ipr_cmd->ioarcb.cmd_pkt.cdb[8] = sglist->buffer_len & 0x0000ff; in ipr_reset_ucode_download()
8377 ipr_build_ucode_ioadl64(ipr_cmd, sglist); in ipr_reset_ucode_download()
8379 ipr_build_ucode_ioadl(ipr_cmd, sglist); in ipr_reset_ucode_download()