Lines Matching full:sg
32 struct scatterlist *sg; in sl3516_ce_need_fallback() local
41 * Note: TX need one control desc for each SG in sl3516_ce_need_fallback()
53 sg = areq->src; in sl3516_ce_need_fallback()
54 while (sg) { in sl3516_ce_need_fallback()
55 if ((sg->length % 16) != 0) { in sl3516_ce_need_fallback()
59 if ((sg_dma_len(sg) % 16) != 0) { in sl3516_ce_need_fallback()
63 if (!IS_ALIGNED(sg->offset, 16)) { in sl3516_ce_need_fallback()
67 sg = sg_next(sg); in sl3516_ce_need_fallback()
69 sg = areq->dst; in sl3516_ce_need_fallback()
70 while (sg) { in sl3516_ce_need_fallback()
71 if ((sg->length % 16) != 0) { in sl3516_ce_need_fallback()
75 if ((sg_dma_len(sg) % 16) != 0) { in sl3516_ce_need_fallback()
79 if (!IS_ALIGNED(sg->offset, 16)) { in sl3516_ce_need_fallback()
83 sg = sg_next(sg); in sl3516_ce_need_fallback()
86 /* need same numbers of SG (with same length) for source and destination */ in sl3516_ce_need_fallback()
135 struct scatterlist *sg; in sl3516_ce_cipher() local
157 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sl3516_ce_cipher()
166 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sl3516_ce_cipher()
173 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgd); in sl3516_ce_cipher()
181 sg = areq->src; in sl3516_ce_cipher()
182 while (i < nr_sgs && sg && len) { in sl3516_ce_cipher()
183 if (sg_dma_len(sg) == 0) in sl3516_ce_cipher()
185 rctx->t_src[i].addr = sg_dma_address(sg); in sl3516_ce_cipher()
186 todo = min(len, sg_dma_len(sg)); in sl3516_ce_cipher()
189 areq->cryptlen, i, rctx->t_src[i].len, sg->offset, todo); in sl3516_ce_cipher()
193 sg = sg_next(sg); in sl3516_ce_cipher()
203 sg = areq->dst; in sl3516_ce_cipher()
204 while (i < nr_sgd && sg && len) { in sl3516_ce_cipher()
205 if (sg_dma_len(sg) == 0) in sl3516_ce_cipher()
207 rctx->t_dst[i].addr = sg_dma_address(sg); in sl3516_ce_cipher()
208 todo = min(len, sg_dma_len(sg)); in sl3516_ce_cipher()
211 areq->cryptlen, i, rctx->t_dst[i].len, sg->offset, todo); in sl3516_ce_cipher()
216 sg = sg_next(sg); in sl3516_ce_cipher()