Lines Matching refs:bufl
63 struct qat_alg_buf_list *bufl; in __qat_bl_sgl_to_bufl() local
68 size_t sz_out, sz = struct_size(bufl, buffers, n); in __qat_bl_sgl_to_bufl()
80 bufl = kzalloc_node(sz, flags, node); in __qat_bl_sgl_to_bufl()
81 if (unlikely(!bufl)) in __qat_bl_sgl_to_bufl()
84 bufl = &buf->sgl_src.sgl_hdr; in __qat_bl_sgl_to_bufl()
85 memset(bufl, 0, sizeof(struct qat_alg_buf_list)); in __qat_bl_sgl_to_bufl()
92 bufl->buffers[i].addr = DMA_MAPPING_ERROR; in __qat_bl_sgl_to_bufl()
106 bufl->buffers[y].addr = dma_map_single(dev, sg_virt(sg) + left, in __qat_bl_sgl_to_bufl()
109 bufl->buffers[y].len = sg->length; in __qat_bl_sgl_to_bufl()
110 if (unlikely(dma_mapping_error(dev, bufl->buffers[y].addr))) in __qat_bl_sgl_to_bufl()
114 bufl->buffers[y].len -= left; in __qat_bl_sgl_to_bufl()
118 bufl->num_bufs = sg_nctr; in __qat_bl_sgl_to_bufl()
119 blp = dma_map_single(dev, bufl, sz, DMA_TO_DEVICE); in __qat_bl_sgl_to_bufl()
122 buf->bl = bufl; in __qat_bl_sgl_to_bufl()
217 if (!dma_mapping_error(dev, bufl->buffers[i].addr)) in __qat_bl_sgl_to_bufl()
218 dma_unmap_single(dev, bufl->buffers[i].addr, in __qat_bl_sgl_to_bufl()
219 bufl->buffers[i].len, in __qat_bl_sgl_to_bufl()
223 kfree(bufl); in __qat_bl_sgl_to_bufl()
271 struct qat_alg_buf_list *bufl; in qat_bl_sgl_map() local
278 sz = struct_size(bufl, buffers, n); in qat_bl_sgl_map()
279 bufl = kzalloc_node(sz, GFP_KERNEL, node); in qat_bl_sgl_map()
280 if (unlikely(!bufl)) in qat_bl_sgl_map()
284 bufl->buffers[i].addr = DMA_MAPPING_ERROR; in qat_bl_sgl_map()
293 bufl->buffers[y].addr = dma_map_single(dev, sg_virt(sg), in qat_bl_sgl_map()
296 bufl->buffers[y].len = sg->length; in qat_bl_sgl_map()
297 if (unlikely(dma_mapping_error(dev, bufl->buffers[y].addr))) in qat_bl_sgl_map()
301 bufl->num_bufs = sg_nctr; in qat_bl_sgl_map()
302 bufl->num_mapped_bufs = sg_nctr; in qat_bl_sgl_map()
304 *bl = bufl; in qat_bl_sgl_map()
310 if (!dma_mapping_error(dev, bufl->buffers[i].addr)) in qat_bl_sgl_map()
311 dma_unmap_single(dev, bufl->buffers[i].addr, in qat_bl_sgl_map()
312 bufl->buffers[i].len, in qat_bl_sgl_map()
314 kfree(bufl); in qat_bl_sgl_map()