/drivers/crypto/qce/ |
D | skcipher.c | 51 dma_unmap_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_skcipher_done() 75 int dst_nents, src_nents, ret; in qce_skcipher_async_req_handle() local 87 rctx->dst_nents = sg_nents_for_len(req->dst, req->cryptlen); in qce_skcipher_async_req_handle() 89 rctx->dst_nents = rctx->src_nents; in qce_skcipher_async_req_handle() 94 if (rctx->dst_nents < 0) { in qce_skcipher_async_req_handle() 96 return -rctx->dst_nents; in qce_skcipher_async_req_handle() 99 rctx->dst_nents += 1; in qce_skcipher_async_req_handle() 104 ret = sg_alloc_table(&rctx->dst_tbl, rctx->dst_nents, gfp); in qce_skcipher_async_req_handle() 126 dst_nents = dma_map_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_skcipher_async_req_handle() 127 if (dst_nents < 0) { in qce_skcipher_async_req_handle() [all …]
|
D | aead.c | 51 dma_unmap_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_aead_done() 125 rctx->dst_nents = sg_nents_for_len(req->dst, totallen); in qce_aead_prepare_dst_buf() 126 if (rctx->dst_nents < 0) { in qce_aead_prepare_dst_buf() 131 rctx->dst_nents += 2; in qce_aead_prepare_dst_buf() 133 rctx->dst_nents += 1; in qce_aead_prepare_dst_buf() 137 ret = sg_alloc_table(&rctx->dst_tbl, rctx->dst_nents, gfp); in qce_aead_prepare_dst_buf() 175 rctx->dst_nents = sg_nents_for_len(rctx->dst_sg, totallen) + 1; in qce_aead_prepare_dst_buf() 289 rctx->dst_nents = rctx->src_nents + 1; in qce_aead_ccm_prepare_buf_assoclen() 291 rctx->dst_nents = rctx->src_nents; in qce_aead_ccm_prepare_buf_assoclen() 323 rctx->src_nents = rctx->dst_nents - 1; in qce_aead_prepare_buf() [all …]
|
D | cipher.h | 39 int dst_nents; member
|
D | aead.h | 31 int dst_nents; member
|
/drivers/crypto/caam/ |
D | caamalg_qi.c | 799 int dst_nents; member 821 int dst_nents; member 869 int dst_nents, dma_addr_t iv_dma, int ivsize, in caam_unmap() argument 876 if (dst_nents) in caam_unmap() 877 dma_unmap_sg(dev, dst, dst_nents, DMA_FROM_DEVICE); in caam_unmap() 895 caam_unmap(dev, req->src, req->dst, edesc->src_nents, edesc->dst_nents, in aead_unmap() 907 caam_unmap(dev, req->src, req->dst, edesc->src_nents, edesc->dst_nents, in skcipher_unmap() 946 int src_nents, mapped_src_nents, dst_nents = 0, mapped_dst_nents = 0; in aead_edesc_alloc() local 999 dst_nents = sg_nents_for_len(req->dst, dst_len); in aead_edesc_alloc() 1000 if (unlikely(dst_nents < 0)) { in aead_edesc_alloc() [all …]
|
D | caamalg.c | 890 int dst_nents; member 916 int dst_nents; member 929 int dst_nents, in caam_unmap() argument 936 if (dst_nents) in caam_unmap() 937 dma_unmap_sg(dev, dst, dst_nents, DMA_FROM_DEVICE); in caam_unmap() 954 edesc->src_nents, edesc->dst_nents, 0, 0, in aead_unmap() 965 edesc->src_nents, edesc->dst_nents, in skcipher_unmap() 1039 edesc->dst_nents > 1 ? 100 : req->cryptlen, 1); in skcipher_crypt_done() 1299 int src_nents, mapped_src_nents, dst_nents = 0, mapped_dst_nents = 0; in aead_edesc_alloc() local 1316 dst_nents = sg_nents_for_len(req->dst, dst_len); in aead_edesc_alloc() [all …]
|
D | caamalg_qi2.h | 112 int dst_nents; member 132 int dst_nents; member
|
D | caamalg_qi2.c | 150 int dst_nents, dma_addr_t iv_dma, int ivsize, in caam_unmap() argument 157 if (dst_nents) in caam_unmap() 158 dma_unmap_sg(dev, dst, dst_nents, DMA_FROM_DEVICE); in caam_unmap() 362 int src_nents, mapped_src_nents, dst_nents = 0, mapped_dst_nents = 0; in aead_edesc_alloc() local 391 dst_nents = sg_nents_for_len(req->dst, dst_len); in aead_edesc_alloc() 392 if (unlikely(dst_nents < 0)) { in aead_edesc_alloc() 396 return ERR_PTR(dst_nents); in aead_edesc_alloc() 411 if (dst_nents) { in aead_edesc_alloc() 412 mapped_dst_nents = dma_map_sg(dev, req->dst, dst_nents, in aead_edesc_alloc() 476 caam_unmap(dev, req->src, req->dst, src_nents, dst_nents, 0, in aead_edesc_alloc() [all …]
|
D | caampkc.c | 48 dma_unmap_sg(dev, req->dst, edesc->dst_nents, DMA_FROM_DEVICE); in rsa_io_unmap() 256 int src_nents, dst_nents; in rsa_edesc_alloc() local 286 dst_nents = sg_nents_for_len(req->dst, req->dst_len); in rsa_edesc_alloc() 294 mapped_dst_nents = dma_map_sg(dev, req->dst, dst_nents, in rsa_edesc_alloc() 335 edesc->dst_nents = dst_nents; in rsa_edesc_alloc() 363 dma_unmap_sg(dev, req->dst, dst_nents, DMA_FROM_DEVICE); in rsa_edesc_alloc()
|
D | caampkc.h | 136 int dst_nents; member
|
/drivers/crypto/keembay/ |
D | keembay-ocs-aes-core.c | 89 int dst_nents; member 390 dma_unmap_sg(dev, req->dst, rctx->dst_nents, rctx->in_place ? in kmb_ocs_sk_dma_cleanup() 422 sg_swap_blocks(req->dst, rctx->dst_nents, in kmb_ocs_sk_prepare_inplace() 428 rctx->dst_nents, DMA_BIDIRECTIONAL); in kmb_ocs_sk_prepare_inplace() 478 rctx->dst_nents, DMA_FROM_DEVICE); in kmb_ocs_sk_prepare_notinplace() 526 rctx->dst_nents = sg_nents_for_len(req->dst, req->cryptlen); in kmb_ocs_sk_run() 527 if (rctx->dst_nents < 0) in kmb_ocs_sk_run() 563 sg_swap_blocks(req->dst, rctx->dst_nents, in kmb_ocs_sk_run() 697 dma_unmap_sg(dev, req->dst, rctx->dst_nents, rctx->in_place ? in kmb_ocs_aead_dma_cleanup() 786 rctx->dst_nents = sg_nents_for_len(req->dst, dst_size); in kmb_ocs_aead_dma_prepare() [all …]
|
/drivers/crypto/marvell/cesa/ |
D | cipher.c | 64 dma_unmap_sg(cesa_dev->dev, req->dst, creq->dst_nents, in mv_cesa_skcipher_dma_cleanup() 131 len = mv_cesa_sg_copy_from_sram(engine, req->dst, creq->dst_nents, in mv_cesa_skcipher_std_process() 332 ret = dma_map_sg(cesa_dev->dev, req->dst, creq->dst_nents, in mv_cesa_skcipher_dma_req_init() 396 dma_unmap_sg(cesa_dev->dev, req->dst, creq->dst_nents, in mv_cesa_skcipher_dma_req_init() 438 creq->dst_nents = sg_nents_for_len(req->dst, req->cryptlen); in mv_cesa_skcipher_req_init() 439 if (creq->dst_nents < 0) { in mv_cesa_skcipher_req_init() 441 return creq->dst_nents; in mv_cesa_skcipher_req_init()
|
D | cesa.h | 574 int dst_nents; member
|
/drivers/crypto/ |
D | talitos.c | 968 unsigned int dst_nents = edesc->dst_nents ? : 1; in talitos_sg_unmap() local 970 if (is_sec1 && dst && dst_nents > 1) { in talitos_sg_unmap() 973 sg_pcopy_from_buffer(dst, dst_nents, edesc->buf + offset, len, in talitos_sg_unmap() 980 if (dst && (dst_nents == 1 || !is_sec1)) in talitos_sg_unmap() 981 dma_unmap_sg(dev, dst, dst_nents, DMA_FROM_DEVICE); in talitos_sg_unmap() 1012 unsigned int dst_nents = edesc->dst_nents ? : 1; in ipsec_esp_unmap() local 1014 sg_pcopy_to_buffer(areq->dst, dst_nents, ctx->iv, ivsize, in ipsec_esp_unmap() 1265 sg_count = edesc->dst_nents ? : 1; in ipsec_esp() 1332 int src_nents, dst_nents, alloc_len, dma_len, src_len, dst_len; in talitos_edesc_alloc() local 1353 dst_nents = dst ? src_nents : 0; in talitos_edesc_alloc() [all …]
|
D | sa2ul.c | 1087 int sg_nents, src_nents, dst_nents; in sa_run() local 1198 dst_nents = src_nents; in sa_run() 1201 dst_nents = sg_nents_for_len(req->dst, req->size); in sa_run() 1204 if (dst_nents == 1 && split_size <= req->dst->length) { in sa_run() 1206 dst_nents = 1; in sa_run() 1212 mapped_sg->sgt.orig_nents = dst_nents; in sa_run() 1222 mapped_sg->sgt.orig_nents = dst_nents; in sa_run() 1232 0, 1, &split_size, &dst, &dst_nents, in sa_run() 1235 dst_nents = mapped_sg->sgt.nents; in sa_run() 1243 rxd->tx_in = dmaengine_prep_slave_sg(dma_rx, dst, dst_nents, in sa_run()
|
D | talitos.h | 62 int dst_nents; member
|
D | mxs-dcp.c | 303 int dst_nents = sg_nents(dst); in mxs_dcp_aes_block_crypt() local 365 sg_pcopy_from_buffer(dst, dst_nents, out_buf, in mxs_dcp_aes_block_crypt()
|
/drivers/crypto/virtio/ |
D | virtio_crypto_algs.c | 349 int src_nents, dst_nents; in __virtio_crypto_skcipher_do_req() local 365 dst_nents = sg_nents(req->dst); in __virtio_crypto_skcipher_do_req() 368 src_nents, dst_nents); in __virtio_crypto_skcipher_do_req() 371 sg_total = src_nents + dst_nents + 3; in __virtio_crypto_skcipher_do_req()
|
/drivers/crypto/ccp/ |
D | ccp-dmaengine.c | 354 unsigned int dst_nents, in ccp_create_desc() argument 375 if (!dst_nents || !src_nents) in ccp_create_desc() 406 dst_nents--; in ccp_create_desc() 407 if (!dst_nents) in ccp_create_desc()
|
/drivers/crypto/bcm/ |
D | cipher.h | 295 int dst_nents; /* Number of dst entries with data */ member
|
D | cipher.c | 162 rctx->dst_nents, chunksize); in spu_skcipher_rx_sg_create() 349 rctx->dst_nents = spu_sg_count(rctx->dst_sg, rctx->dst_skip, chunksize); in handle_skcipher_req() 434 rx_frag_num += rctx->dst_nents; in handle_skcipher_req() 1106 rctx->dst_nents, resp_len); in spu_aead_rx_sg_create() 1345 rctx->dst_nents = spu_sg_count(rctx->dst_sg, rctx->dst_skip, chunksize); in handle_aead_req() 1473 rx_frag_num += rctx->dst_nents; in handle_aead_req() 1492 rx_frag_num -= rctx->dst_nents; in handle_aead_req() 1738 rctx->dst_nents = 0; in skcipher_enqueue() 1926 rctx->dst_nents = 0; in ahash_enqueue() 2680 rctx->dst_nents = 0; in aead_enqueue()
|
/drivers/crypto/chelsio/ |
D | chcr_algo.c | 2402 static int chcr_aead_need_fallback(struct aead_request *req, int dst_nents, in chcr_aead_need_fallback() argument 2409 dst_nents > MAX_DSGL_ENT || in chcr_aead_need_fallback()
|