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