Lines Matching refs:sg_wa

254 	ccp_sg_free(&data->sg_wa);  in ccp_free_data()
266 ret = ccp_init_sg_workarea(&data->sg_wa, cmd_q->ccp->dev, sg, sg_len, in ccp_init_data()
285 struct ccp_sg_workarea *sg_wa = &data->sg_wa; in ccp_queue_buf() local
293 if (!sg_wa->sg) in ccp_queue_buf()
300 nbytes = min_t(u64, sg_wa->bytes_left, dm_wa->length); in ccp_queue_buf()
301 scatterwalk_map_and_copy(dm_wa->address, sg_wa->sg, sg_wa->sg_used, in ccp_queue_buf()
306 while (sg_wa->bytes_left && (buf_count < dm_wa->length)) { in ccp_queue_buf()
307 nbytes = min(sg_wa->sg->length - sg_wa->sg_used, in ccp_queue_buf()
309 nbytes = min_t(u64, sg_wa->bytes_left, nbytes); in ccp_queue_buf()
312 ccp_update_sg_workarea(sg_wa, nbytes); in ccp_queue_buf()
339 sg_src_len = sg_dma_len(src->sg_wa.sg) - src->sg_wa.sg_used; in ccp_prepare_data()
340 sg_src_len = min_t(u64, src->sg_wa.bytes_left, sg_src_len); in ccp_prepare_data()
343 sg_dst_len = sg_dma_len(dst->sg_wa.sg) - dst->sg_wa.sg_used; in ccp_prepare_data()
344 sg_dst_len = min_t(u64, src->sg_wa.bytes_left, sg_dst_len); in ccp_prepare_data()
373 op->src.u.dma.address = sg_dma_address(src->sg_wa.sg); in ccp_prepare_data()
374 op->src.u.dma.offset = src->sg_wa.sg_used; in ccp_prepare_data()
377 ccp_update_sg_workarea(&src->sg_wa, op->src.u.dma.length); in ccp_prepare_data()
394 op->dst.u.dma.address = sg_dma_address(dst->sg_wa.sg); in ccp_prepare_data()
395 op->dst.u.dma.offset = dst->sg_wa.sg_used; in ccp_prepare_data()
410 ccp_update_sg_workarea(&dst->sg_wa, in ccp_process_data()
556 while (src.sg_wa.bytes_left) { in ccp_run_aes_cmac_cmd()
558 if (aes->cmac_final && !src.sg_wa.bytes_left) { in ccp_run_aes_cmac_cmd()
726 while (aad.sg_wa.bytes_left) { in ccp_run_aes_gcm_cmd()
766 while (src.sg_wa.bytes_left) { in ccp_run_aes_gcm_cmd()
768 if (!src.sg_wa.bytes_left) { in ccp_run_aes_gcm_cmd()
1003 while (src.sg_wa.bytes_left) { in ccp_run_aes_cmd()
1005 if (!src.sg_wa.bytes_left) { in ccp_run_aes_cmd()
1213 while (src.sg_wa.bytes_left) { in ccp_run_xts_aes_cmd()
1215 if (!src.sg_wa.bytes_left) in ccp_run_xts_aes_cmd()
1405 while (src.sg_wa.bytes_left) { in ccp_run_des3_cmd()
1407 if (!src.sg_wa.bytes_left) { in ccp_run_des3_cmd()
1671 while (src.sg_wa.bytes_left) { in ccp_run_sha_cmd()
1673 if (sha->final && !src.sg_wa.bytes_left) in ccp_run_sha_cmd()
2016 dst.sg_wa.sg_used = 0; in ccp_run_passthru_cmd()
2017 for (i = 1; i <= src.sg_wa.dma_count; i++) { in ccp_run_passthru_cmd()
2018 if (!dst.sg_wa.sg || in ccp_run_passthru_cmd()
2019 (dst.sg_wa.sg->length < src.sg_wa.sg->length)) { in ccp_run_passthru_cmd()
2024 if (i == src.sg_wa.dma_count) { in ccp_run_passthru_cmd()
2030 op.src.u.dma.address = sg_dma_address(src.sg_wa.sg); in ccp_run_passthru_cmd()
2032 op.src.u.dma.length = sg_dma_len(src.sg_wa.sg); in ccp_run_passthru_cmd()
2035 op.dst.u.dma.address = sg_dma_address(dst.sg_wa.sg); in ccp_run_passthru_cmd()
2036 op.dst.u.dma.offset = dst.sg_wa.sg_used; in ccp_run_passthru_cmd()
2045 dst.sg_wa.sg_used += src.sg_wa.sg->length; in ccp_run_passthru_cmd()
2046 if (dst.sg_wa.sg_used == dst.sg_wa.sg->length) { in ccp_run_passthru_cmd()
2047 dst.sg_wa.sg = sg_next(dst.sg_wa.sg); in ccp_run_passthru_cmd()
2048 dst.sg_wa.sg_used = 0; in ccp_run_passthru_cmd()
2050 src.sg_wa.sg = sg_next(src.sg_wa.sg); in ccp_run_passthru_cmd()