/openbmc/linux/drivers/crypto/allwinner/sun8i-ce/ |
H A D | sun8i-ce-cipher.c | 135 int nr_sgs = 0; in sun8i_ce_cipher_prepare() local 216 if (nr_sgs <= 0 || nr_sgs > MAX_SG) { in sun8i_ce_cipher_prepare() 217 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ce_cipher_prepare() 221 nr_sgd = nr_sgs; in sun8i_ce_cipher_prepare() 224 if (nr_sgs <= 0 || nr_sgs > MAX_SG) { in sun8i_ce_cipher_prepare() 225 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ce_cipher_prepare() 238 for_each_sg(areq->src, sg, nr_sgs, i) { in sun8i_ce_cipher_prepare() 268 rctx->nr_sgs = nr_sgs; in sun8i_ce_cipher_prepare() 276 if (nr_sgs > 0) in sun8i_ce_cipher_prepare() 313 int nr_sgs = rctx->nr_sgs; in sun8i_ce_cipher_unprepare() local [all …]
|
H A D | sun8i-ce-hash.c | 248 int nr_sgs, e, i; in sun8i_ce_hash_digest() local 253 nr_sgs = sg_nents_for_len(areq->src, areq->nbytes); in sun8i_ce_hash_digest() 254 if (nr_sgs > MAX_SG - 1) in sun8i_ce_hash_digest() 257 for_each_sg(areq->src, sg, nr_sgs, i) { in sun8i_ce_hash_digest() 341 int nr_sgs, flow, err; in sun8i_ce_hash_run() local 397 nr_sgs = dma_map_sg(ce->dev, areq->src, ns, DMA_TO_DEVICE); in sun8i_ce_hash_run() 398 if (nr_sgs <= 0 || nr_sgs > MAX_SG) { in sun8i_ce_hash_run() 399 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ce_hash_run() 405 for_each_sg(areq->src, sg, nr_sgs, i) { in sun8i_ce_hash_run()
|
H A D | sun8i-ce.h | 259 int nr_sgs; member
|
/openbmc/linux/drivers/crypto/gemini/ |
H A D | sl3516-ce-cipher.c | 138 int nr_sgs = 0; in sl3516_ce_cipher() local 154 nr_sgs = dma_map_sg(ce->dev, areq->src, sg_nents(areq->src), in sl3516_ce_cipher() 156 if (nr_sgs <= 0 || nr_sgs > MAXDESC / 2) { in sl3516_ce_cipher() 157 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sl3516_ce_cipher() 161 nr_sgd = nr_sgs; in sl3516_ce_cipher() 163 nr_sgs = dma_map_sg(ce->dev, areq->src, sg_nents(areq->src), in sl3516_ce_cipher() 165 if (nr_sgs <= 0 || nr_sgs > MAXDESC / 2) { in sl3516_ce_cipher() 166 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sl3516_ce_cipher() 182 while (i < nr_sgs && sg && len) { in sl3516_ce_cipher() 196 dev_err(ce->dev, "remaining len %d/%u nr_sgs=%d\n", len, areq->cryptlen, nr_sgs); in sl3516_ce_cipher() [all …]
|
H A D | sl3516-ce.h | 287 int nr_sgs; member
|
H A D | sl3516-ce-core.c | 143 for (i = 0; i < rctx->nr_sgs; i++) { in sl3516_ce_run_task() 145 i, rctx->nr_sgs, rctx->t_src[i].len); in sl3516_ce_run_task()
|
/openbmc/linux/drivers/crypto/amlogic/ |
H A D | amlogic-gxl-cipher.c | 97 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) { 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 || nr_sgs > MAXDESC - 3) { in meson_cipher() 190 dev_err(mc->dev, "Invalid SG count %d\n", nr_sgs); in meson_cipher()
|
/openbmc/linux/drivers/crypto/allwinner/sun8i-ss/ |
H A D | sun8i-ss-cipher.c | 194 int nr_sgs = 0; in sun8i_ss_cipher() local 231 nr_sgs = dma_map_sg(ss->dev, areq->src, nsgs, DMA_BIDIRECTIONAL); in sun8i_ss_cipher() 232 if (nr_sgs <= 0 || nr_sgs > 8) { in sun8i_ss_cipher() 233 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_cipher() 237 nr_sgd = nr_sgs; in sun8i_ss_cipher() 239 nr_sgs = dma_map_sg(ss->dev, areq->src, nsgs, DMA_TO_DEVICE); in sun8i_ss_cipher() 240 if (nr_sgs <= 0 || nr_sgs > 8) { in sun8i_ss_cipher() 241 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_cipher() 256 while (i < nr_sgs && sg && len) { in sun8i_ss_cipher()
|
H A D | sun8i-ss-hash.c | 501 int nr_sgs, err, digestsize; in sun8i_ss_hash_run() local 537 nr_sgs = dma_map_sg(ss->dev, areq->src, sg_nents(areq->src), DMA_TO_DEVICE); in sun8i_ss_hash_run() 538 if (nr_sgs <= 0 || nr_sgs > MAX_SG) { in sun8i_ss_hash_run() 539 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_hash_run()
|