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 = container_of(&buf->sgl_src.sgl_hdr, in __qat_bl_sgl_to_bufl()
86 memset(bufl, 0, sizeof(struct qat_alg_buf_list)); in __qat_bl_sgl_to_bufl()
93 bufl->buffers[i].addr = DMA_MAPPING_ERROR; in __qat_bl_sgl_to_bufl()
107 bufl->buffers[y].addr = dma_map_single(dev, sg_virt(sg) + left, in __qat_bl_sgl_to_bufl()
110 bufl->buffers[y].len = sg->length; in __qat_bl_sgl_to_bufl()
111 if (unlikely(dma_mapping_error(dev, bufl->buffers[y].addr))) in __qat_bl_sgl_to_bufl()
115 bufl->buffers[y].len -= left; in __qat_bl_sgl_to_bufl()
119 bufl->num_bufs = sg_nctr; in __qat_bl_sgl_to_bufl()
120 blp = dma_map_single(dev, bufl, sz, DMA_TO_DEVICE); in __qat_bl_sgl_to_bufl()
123 buf->bl = bufl; in __qat_bl_sgl_to_bufl()
219 if (!dma_mapping_error(dev, bufl->buffers[i].addr)) in __qat_bl_sgl_to_bufl()
220 dma_unmap_single(dev, bufl->buffers[i].addr, in __qat_bl_sgl_to_bufl()
221 bufl->buffers[i].len, in __qat_bl_sgl_to_bufl()
225 kfree(bufl); in __qat_bl_sgl_to_bufl()
273 struct qat_alg_buf_list *bufl; in qat_bl_sgl_map() local
280 sz = struct_size(bufl, buffers, n); in qat_bl_sgl_map()
281 bufl = kzalloc_node(sz, GFP_KERNEL, node); in qat_bl_sgl_map()
282 if (unlikely(!bufl)) in qat_bl_sgl_map()
286 bufl->buffers[i].addr = DMA_MAPPING_ERROR; in qat_bl_sgl_map()
295 bufl->buffers[y].addr = dma_map_single(dev, sg_virt(sg), in qat_bl_sgl_map()
298 bufl->buffers[y].len = sg->length; in qat_bl_sgl_map()
299 if (unlikely(dma_mapping_error(dev, bufl->buffers[y].addr))) in qat_bl_sgl_map()
303 bufl->num_bufs = sg_nctr; in qat_bl_sgl_map()
304 bufl->num_mapped_bufs = sg_nctr; in qat_bl_sgl_map()
306 *bl = bufl; in qat_bl_sgl_map()
312 if (!dma_mapping_error(dev, bufl->buffers[i].addr)) in qat_bl_sgl_map()
313 dma_unmap_single(dev, bufl->buffers[i].addr, in qat_bl_sgl_map()
314 bufl->buffers[i].len, in qat_bl_sgl_map()
316 kfree(bufl); in qat_bl_sgl_map()