Lines Matching refs:sg_wa
265 ccp_sg_free(&data->sg_wa); in ccp_free_data()
277 ret = ccp_init_sg_workarea(&data->sg_wa, cmd_q->ccp->dev, sg, sg_len, in ccp_init_data()
296 struct ccp_sg_workarea *sg_wa = &data->sg_wa; in ccp_queue_buf() local
304 if (!sg_wa->sg) in ccp_queue_buf()
311 nbytes = min_t(u64, sg_wa->bytes_left, dm_wa->length); in ccp_queue_buf()
312 scatterwalk_map_and_copy(dm_wa->address, sg_wa->sg, sg_wa->sg_used, in ccp_queue_buf()
317 while (sg_wa->bytes_left && (buf_count < dm_wa->length)) { in ccp_queue_buf()
318 nbytes = min(sg_dma_len(sg_wa->dma_sg) - sg_wa->sg_used, in ccp_queue_buf()
320 nbytes = min_t(u64, sg_wa->bytes_left, nbytes); in ccp_queue_buf()
323 ccp_update_sg_workarea(sg_wa, nbytes); in ccp_queue_buf()
350 sg_src_len = sg_dma_len(src->sg_wa.dma_sg) - src->sg_wa.sg_used; in ccp_prepare_data()
351 sg_src_len = min_t(u64, src->sg_wa.bytes_left, sg_src_len); in ccp_prepare_data()
354 sg_dst_len = sg_dma_len(dst->sg_wa.dma_sg) - dst->sg_wa.sg_used; in ccp_prepare_data()
355 sg_dst_len = min_t(u64, src->sg_wa.bytes_left, sg_dst_len); in ccp_prepare_data()
384 op->src.u.dma.address = sg_dma_address(src->sg_wa.dma_sg); in ccp_prepare_data()
385 op->src.u.dma.offset = src->sg_wa.sg_used; in ccp_prepare_data()
388 ccp_update_sg_workarea(&src->sg_wa, op->src.u.dma.length); in ccp_prepare_data()
405 op->dst.u.dma.address = sg_dma_address(dst->sg_wa.dma_sg); in ccp_prepare_data()
406 op->dst.u.dma.offset = dst->sg_wa.sg_used; in ccp_prepare_data()
421 ccp_update_sg_workarea(&dst->sg_wa, in ccp_process_data()
567 while (src.sg_wa.bytes_left) { in ccp_run_aes_cmac_cmd()
569 if (aes->cmac_final && !src.sg_wa.bytes_left) { in ccp_run_aes_cmac_cmd()
755 while (aad.sg_wa.bytes_left) { in ccp_run_aes_gcm_cmd()
795 while (src.sg_wa.bytes_left) { in ccp_run_aes_gcm_cmd()
797 if (!src.sg_wa.bytes_left) { in ccp_run_aes_gcm_cmd()
1035 while (src.sg_wa.bytes_left) { in ccp_run_aes_cmd()
1037 if (!src.sg_wa.bytes_left) { in ccp_run_aes_cmd()
1245 while (src.sg_wa.bytes_left) { in ccp_run_xts_aes_cmd()
1247 if (!src.sg_wa.bytes_left) in ccp_run_xts_aes_cmd()
1434 while (src.sg_wa.bytes_left) { in ccp_run_des3_cmd()
1436 if (!src.sg_wa.bytes_left) { in ccp_run_des3_cmd()
1697 while (src.sg_wa.bytes_left) { in ccp_run_sha_cmd()
1699 if (sha->final && !src.sg_wa.bytes_left) in ccp_run_sha_cmd()
2044 dst.sg_wa.sg_used = 0; in ccp_run_passthru_cmd()
2045 for (i = 1; i <= src.sg_wa.dma_count; i++) { in ccp_run_passthru_cmd()
2046 if (!dst.sg_wa.sg || in ccp_run_passthru_cmd()
2047 (sg_dma_len(dst.sg_wa.sg) < sg_dma_len(src.sg_wa.sg))) { in ccp_run_passthru_cmd()
2052 if (i == src.sg_wa.dma_count) { in ccp_run_passthru_cmd()
2058 op.src.u.dma.address = sg_dma_address(src.sg_wa.sg); in ccp_run_passthru_cmd()
2060 op.src.u.dma.length = sg_dma_len(src.sg_wa.sg); in ccp_run_passthru_cmd()
2063 op.dst.u.dma.address = sg_dma_address(dst.sg_wa.sg); in ccp_run_passthru_cmd()
2064 op.dst.u.dma.offset = dst.sg_wa.sg_used; in ccp_run_passthru_cmd()
2073 dst.sg_wa.sg_used += sg_dma_len(src.sg_wa.sg); in ccp_run_passthru_cmd()
2074 if (dst.sg_wa.sg_used == sg_dma_len(dst.sg_wa.sg)) { in ccp_run_passthru_cmd()
2075 dst.sg_wa.sg = sg_next(dst.sg_wa.sg); in ccp_run_passthru_cmd()
2076 dst.sg_wa.sg_used = 0; in ccp_run_passthru_cmd()
2078 src.sg_wa.sg = sg_next(src.sg_wa.sg); in ccp_run_passthru_cmd()