Home
last modified time | relevance | path

Searched refs:nr_sgs (Results 1 – 6 of 6) sorted by relevance

/Linux-v5.10/drivers/crypto/allwinner/sun8i-ce/
Dsun8i-ce-cipher.c93 int nr_sgs = 0; in sun8i_ce_cipher_prepare() local
181 nr_sgs = dma_map_sg(ce->dev, areq->src, sg_nents(areq->src), in sun8i_ce_cipher_prepare()
183 if (nr_sgs <= 0 || nr_sgs > MAX_SG) { in sun8i_ce_cipher_prepare()
184 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ce_cipher_prepare()
188 nr_sgd = nr_sgs; in sun8i_ce_cipher_prepare()
190 nr_sgs = dma_map_sg(ce->dev, areq->src, sg_nents(areq->src), in sun8i_ce_cipher_prepare()
192 if (nr_sgs <= 0 || nr_sgs > MAX_SG) { in sun8i_ce_cipher_prepare()
193 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ce_cipher_prepare()
207 for_each_sg(areq->src, sg, nr_sgs, i) { in sun8i_ce_cipher_prepare()
237 rctx->nr_sgs = nr_sgs; in sun8i_ce_cipher_prepare()
[all …]
Dsun8i-ce-hash.c225 int nr_sgs, e, i; in sun8i_ce_hash_digest() local
230 nr_sgs = sg_nents(areq->src); in sun8i_ce_hash_digest()
231 if (nr_sgs > MAX_SG - 1) in sun8i_ce_hash_digest()
234 for_each_sg(areq->src, sg, nr_sgs, i) { in sun8i_ce_hash_digest()
260 int nr_sgs, flow, err; in sun8i_ce_hash_run() local
315 nr_sgs = dma_map_sg(ce->dev, areq->src, sg_nents(areq->src), DMA_TO_DEVICE); in sun8i_ce_hash_run()
316 if (nr_sgs <= 0 || nr_sgs > MAX_SG) { in sun8i_ce_hash_run()
317 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ce_hash_run()
323 for_each_sg(areq->src, sg, nr_sgs, i) { in sun8i_ce_hash_run()
403 dma_unmap_sg(ce->dev, areq->src, nr_sgs, DMA_TO_DEVICE); in sun8i_ce_hash_run()
Dsun8i-ce.h257 int nr_sgs; member
/Linux-v5.10/drivers/crypto/allwinner/sun8i-ss/
Dsun8i-ss-cipher.c106 int nr_sgs = 0; in sun8i_ss_cipher() local
162 nr_sgs = dma_map_sg(ss->dev, areq->src, sg_nents(areq->src), in sun8i_ss_cipher()
164 if (nr_sgs <= 0 || nr_sgs > 8) { in sun8i_ss_cipher()
165 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_cipher()
169 nr_sgd = nr_sgs; in sun8i_ss_cipher()
171 nr_sgs = dma_map_sg(ss->dev, areq->src, sg_nents(areq->src), in sun8i_ss_cipher()
173 if (nr_sgs <= 0 || nr_sgs > 8) { in sun8i_ss_cipher()
174 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_cipher()
190 while (i < nr_sgs && sg && len) { in sun8i_ss_cipher()
235 dma_unmap_sg(ss->dev, areq->src, nr_sgs, DMA_BIDIRECTIONAL); in sun8i_ss_cipher()
[all …]
Dsun8i-ss-hash.c290 int nr_sgs, e, i; in sun8i_ss_hash_digest() local
295 nr_sgs = sg_nents(areq->src); in sun8i_ss_hash_digest()
296 if (nr_sgs > MAX_SG - 1) in sun8i_ss_hash_digest()
299 for_each_sg(areq->src, sg, nr_sgs, i) { in sun8i_ss_hash_digest()
326 int nr_sgs, err, digestsize; in sun8i_ss_hash_run() local
364 nr_sgs = dma_map_sg(ss->dev, areq->src, sg_nents(areq->src), DMA_TO_DEVICE); in sun8i_ss_hash_run()
365 if (nr_sgs <= 0 || nr_sgs > MAX_SG) { in sun8i_ss_hash_run()
366 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_hash_run()
379 for_each_sg(areq->src, sg, nr_sgs, i) { in sun8i_ss_hash_run()
434 dma_unmap_sg(ss->dev, areq->src, nr_sgs, DMA_TO_DEVICE); in sun8i_ss_hash_run()
/Linux-v5.10/drivers/crypto/amlogic/
Damlogic-gxl-cipher.c97 int nr_sgs, nr_sgd; in meson_cipher() local
178 nr_sgs = dma_map_sg(mc->dev, areq->src, sg_nents(areq->src), in meson_cipher()
180 if (nr_sgs < 0) { in meson_cipher()
181 dev_err(mc->dev, "Invalid SG count %d\n", nr_sgs); in meson_cipher()
185 nr_sgd = nr_sgs; in meson_cipher()
187 nr_sgs = dma_map_sg(mc->dev, areq->src, sg_nents(areq->src), in meson_cipher()
189 if (nr_sgs < 0 || nr_sgs > MAXDESC - 3) { in meson_cipher()
190 dev_err(mc->dev, "Invalid SG count %d\n", nr_sgs); in meson_cipher()
239 dma_unmap_sg(mc->dev, areq->src, nr_sgs, DMA_BIDIRECTIONAL); in meson_cipher()
241 dma_unmap_sg(mc->dev, areq->src, nr_sgs, DMA_TO_DEVICE); in meson_cipher()