Lines Matching refs:sg_wa
268 ccp_sg_free(&data->sg_wa); in ccp_free_data()
280 ret = ccp_init_sg_workarea(&data->sg_wa, cmd_q->ccp->dev, sg, sg_len, in ccp_init_data()
299 struct ccp_sg_workarea *sg_wa = &data->sg_wa; in ccp_queue_buf() local
307 if (!sg_wa->sg) in ccp_queue_buf()
314 nbytes = min_t(u64, sg_wa->bytes_left, dm_wa->length); in ccp_queue_buf()
315 scatterwalk_map_and_copy(dm_wa->address, sg_wa->sg, sg_wa->sg_used, in ccp_queue_buf()
320 while (sg_wa->bytes_left && (buf_count < dm_wa->length)) { in ccp_queue_buf()
321 nbytes = min(sg_dma_len(sg_wa->dma_sg) - sg_wa->sg_used, in ccp_queue_buf()
323 nbytes = min_t(u64, sg_wa->bytes_left, nbytes); in ccp_queue_buf()
326 ccp_update_sg_workarea(sg_wa, nbytes); in ccp_queue_buf()
353 sg_src_len = sg_dma_len(src->sg_wa.dma_sg) - src->sg_wa.sg_used; in ccp_prepare_data()
354 sg_src_len = min_t(u64, src->sg_wa.bytes_left, sg_src_len); in ccp_prepare_data()
357 sg_dst_len = sg_dma_len(dst->sg_wa.dma_sg) - dst->sg_wa.sg_used; in ccp_prepare_data()
358 sg_dst_len = min_t(u64, src->sg_wa.bytes_left, sg_dst_len); in ccp_prepare_data()
387 op->src.u.dma.address = sg_dma_address(src->sg_wa.dma_sg); in ccp_prepare_data()
388 op->src.u.dma.offset = src->sg_wa.sg_used; in ccp_prepare_data()
391 ccp_update_sg_workarea(&src->sg_wa, op->src.u.dma.length); in ccp_prepare_data()
408 op->dst.u.dma.address = sg_dma_address(dst->sg_wa.dma_sg); in ccp_prepare_data()
409 op->dst.u.dma.offset = dst->sg_wa.sg_used; in ccp_prepare_data()
424 ccp_update_sg_workarea(&dst->sg_wa, in ccp_process_data()
570 while (src.sg_wa.bytes_left) { in ccp_run_aes_cmac_cmd()
572 if (aes->cmac_final && !src.sg_wa.bytes_left) { in ccp_run_aes_cmac_cmd()
758 while (aad.sg_wa.bytes_left) { in ccp_run_aes_gcm_cmd()
798 while (src.sg_wa.bytes_left) { in ccp_run_aes_gcm_cmd()
800 if (!src.sg_wa.bytes_left) { in ccp_run_aes_gcm_cmd()
1038 while (src.sg_wa.bytes_left) { in ccp_run_aes_cmd()
1040 if (!src.sg_wa.bytes_left) { in ccp_run_aes_cmd()
1248 while (src.sg_wa.bytes_left) { in ccp_run_xts_aes_cmd()
1250 if (!src.sg_wa.bytes_left) in ccp_run_xts_aes_cmd()
1437 while (src.sg_wa.bytes_left) { in ccp_run_des3_cmd()
1439 if (!src.sg_wa.bytes_left) { in ccp_run_des3_cmd()
1700 while (src.sg_wa.bytes_left) { in ccp_run_sha_cmd()
1702 if (sha->final && !src.sg_wa.bytes_left) in ccp_run_sha_cmd()
2047 dst.sg_wa.sg_used = 0; in ccp_run_passthru_cmd()
2048 for (i = 1; i <= src.sg_wa.dma_count; i++) { in ccp_run_passthru_cmd()
2049 if (!dst.sg_wa.sg || in ccp_run_passthru_cmd()
2050 (sg_dma_len(dst.sg_wa.sg) < sg_dma_len(src.sg_wa.sg))) { in ccp_run_passthru_cmd()
2055 if (i == src.sg_wa.dma_count) { in ccp_run_passthru_cmd()
2061 op.src.u.dma.address = sg_dma_address(src.sg_wa.sg); in ccp_run_passthru_cmd()
2063 op.src.u.dma.length = sg_dma_len(src.sg_wa.sg); in ccp_run_passthru_cmd()
2066 op.dst.u.dma.address = sg_dma_address(dst.sg_wa.sg); in ccp_run_passthru_cmd()
2067 op.dst.u.dma.offset = dst.sg_wa.sg_used; in ccp_run_passthru_cmd()
2076 dst.sg_wa.sg_used += sg_dma_len(src.sg_wa.sg); in ccp_run_passthru_cmd()
2077 if (dst.sg_wa.sg_used == sg_dma_len(dst.sg_wa.sg)) { in ccp_run_passthru_cmd()
2078 dst.sg_wa.sg = sg_next(dst.sg_wa.sg); in ccp_run_passthru_cmd()
2079 dst.sg_wa.sg_used = 0; in ccp_run_passthru_cmd()
2081 src.sg_wa.sg = sg_next(src.sg_wa.sg); in ccp_run_passthru_cmd()