Lines Matching refs:sg_wa
69 struct ccp_sg_workarea sg_wa; member
672 ccp_sg_free(&data->sg_wa); in ccp_free_data()
684 ret = ccp_init_sg_workarea(&data->sg_wa, cmd_q->ccp->dev, sg, sg_len, in ccp_init_data()
703 struct ccp_sg_workarea *sg_wa = &data->sg_wa; in ccp_queue_buf() local
711 if (!sg_wa->sg) in ccp_queue_buf()
718 nbytes = min_t(u64, sg_wa->bytes_left, dm_wa->length); in ccp_queue_buf()
719 scatterwalk_map_and_copy(dm_wa->address, sg_wa->sg, sg_wa->sg_used, in ccp_queue_buf()
724 while (sg_wa->bytes_left && (buf_count < dm_wa->length)) { in ccp_queue_buf()
725 nbytes = min(sg_wa->sg->length - sg_wa->sg_used, in ccp_queue_buf()
727 nbytes = min_t(u64, sg_wa->bytes_left, nbytes); in ccp_queue_buf()
730 ccp_update_sg_workarea(sg_wa, nbytes); in ccp_queue_buf()
757 sg_src_len = sg_dma_len(src->sg_wa.sg) - src->sg_wa.sg_used; in ccp_prepare_data()
758 sg_src_len = min_t(u64, src->sg_wa.bytes_left, sg_src_len); in ccp_prepare_data()
761 sg_dst_len = sg_dma_len(dst->sg_wa.sg) - dst->sg_wa.sg_used; in ccp_prepare_data()
762 sg_dst_len = min_t(u64, src->sg_wa.bytes_left, sg_dst_len); in ccp_prepare_data()
791 op->src.u.dma.address = sg_dma_address(src->sg_wa.sg); in ccp_prepare_data()
792 op->src.u.dma.offset = src->sg_wa.sg_used; in ccp_prepare_data()
795 ccp_update_sg_workarea(&src->sg_wa, op->src.u.dma.length); in ccp_prepare_data()
812 op->dst.u.dma.address = sg_dma_address(dst->sg_wa.sg); in ccp_prepare_data()
813 op->dst.u.dma.offset = dst->sg_wa.sg_used; in ccp_prepare_data()
828 ccp_update_sg_workarea(&dst->sg_wa, in ccp_process_data()
970 while (src.sg_wa.bytes_left) { in ccp_run_aes_cmac_cmd()
972 if (aes->cmac_final && !src.sg_wa.bytes_left) { in ccp_run_aes_cmac_cmd()
1143 while (src.sg_wa.bytes_left) { in ccp_run_aes_cmd()
1145 if (!src.sg_wa.bytes_left) { in ccp_run_aes_cmd()
1316 while (src.sg_wa.bytes_left) { in ccp_run_xts_aes_cmd()
1318 if (!src.sg_wa.bytes_left) in ccp_run_xts_aes_cmd()
1470 while (src.sg_wa.bytes_left) { in ccp_run_sha_cmd()
1472 if (sha->final && !src.sg_wa.bytes_left) in ccp_run_sha_cmd()
1751 dst.sg_wa.sg_used = 0; in ccp_run_passthru_cmd()
1752 for (i = 1; i <= src.sg_wa.dma_count; i++) { in ccp_run_passthru_cmd()
1753 if (!dst.sg_wa.sg || in ccp_run_passthru_cmd()
1754 (dst.sg_wa.sg->length < src.sg_wa.sg->length)) { in ccp_run_passthru_cmd()
1759 if (i == src.sg_wa.dma_count) { in ccp_run_passthru_cmd()
1765 op.src.u.dma.address = sg_dma_address(src.sg_wa.sg); in ccp_run_passthru_cmd()
1767 op.src.u.dma.length = sg_dma_len(src.sg_wa.sg); in ccp_run_passthru_cmd()
1770 op.dst.u.dma.address = sg_dma_address(dst.sg_wa.sg); in ccp_run_passthru_cmd()
1771 op.dst.u.dma.offset = dst.sg_wa.sg_used; in ccp_run_passthru_cmd()
1780 dst.sg_wa.sg_used += src.sg_wa.sg->length; in ccp_run_passthru_cmd()
1781 if (dst.sg_wa.sg_used == dst.sg_wa.sg->length) { in ccp_run_passthru_cmd()
1782 dst.sg_wa.sg = sg_next(dst.sg_wa.sg); in ccp_run_passthru_cmd()
1783 dst.sg_wa.sg_used = 0; in ccp_run_passthru_cmd()
1785 src.sg_wa.sg = sg_next(src.sg_wa.sg); in ccp_run_passthru_cmd()