Lines Matching full:sg

30 	struct scatterlist *sg;  in sun8i_ss_need_fallback()  local
45 sg = areq->src; in sun8i_ss_need_fallback()
46 while (sg) { in sun8i_ss_need_fallback()
47 todo = min(len, sg->length); in sun8i_ss_need_fallback()
52 if (!IS_ALIGNED(sg->offset, 16)) { in sun8i_ss_need_fallback()
57 sg = sg_next(sg); in sun8i_ss_need_fallback()
60 sg = areq->dst; in sun8i_ss_need_fallback()
61 while (sg) { in sun8i_ss_need_fallback()
62 todo = min(len, sg->length); in sun8i_ss_need_fallback()
67 if (!IS_ALIGNED(sg->offset, 16)) { in sun8i_ss_need_fallback()
72 sg = sg_next(sg); in sun8i_ss_need_fallback()
75 /* SS need same numbers of SG (with same length) for source and destination */ in sun8i_ss_need_fallback()
121 struct scatterlist *sg = areq->src; in sun8i_ss_setup_ivs() local
138 while (sg && len) { in sun8i_ss_setup_ivs()
139 if (sg_dma_len(sg) == 0) { in sun8i_ss_setup_ivs()
140 sg = sg_next(sg); in sun8i_ss_setup_ivs()
156 todo = min(len, sg_dma_len(sg)); in sun8i_ss_setup_ivs()
160 offset = sg->length - ivsize; in sun8i_ss_setup_ivs()
161 scatterwalk_map_and_copy(sf->iv[i], sg, offset, ivsize, 0); in sun8i_ss_setup_ivs()
164 sg = sg_next(sg); in sun8i_ss_setup_ivs()
187 struct scatterlist *sg; in sun8i_ss_cipher() local
228 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_cipher()
236 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_cipher()
242 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgd); in sun8i_ss_cipher()
250 sg = areq->src; in sun8i_ss_cipher()
251 while (i < nr_sgs && sg && len) { in sun8i_ss_cipher()
252 if (sg_dma_len(sg) == 0) in sun8i_ss_cipher()
254 rctx->t_src[i].addr = sg_dma_address(sg); in sun8i_ss_cipher()
255 todo = min(len, sg_dma_len(sg)); in sun8i_ss_cipher()
258 areq->cryptlen, i, rctx->t_src[i].len, sg->offset, todo); in sun8i_ss_cipher()
262 sg = sg_next(sg); in sun8i_ss_cipher()
272 sg = areq->dst; in sun8i_ss_cipher()
273 while (i < nr_sgd && sg && len) { in sun8i_ss_cipher()
274 if (sg_dma_len(sg) == 0) in sun8i_ss_cipher()
276 rctx->t_dst[i].addr = sg_dma_address(sg); in sun8i_ss_cipher()
277 todo = min(len, sg_dma_len(sg)); in sun8i_ss_cipher()
280 areq->cryptlen, i, rctx->t_dst[i].len, sg->offset, todo); in sun8i_ss_cipher()
284 sg = sg_next(sg); in sun8i_ss_cipher()