Searched refs:areq (Results 1 - 24 of 24) sorted by relevance

/linux-4.1.27/drivers/crypto/caam/
H A Djr.h15 void *areq),
16 void *areq);
H A Djr.c311 * @areq: optional pointer to an argument passed with the
313 * @areq: optional pointer to a user argument for use at callback
318 u32 status, void *areq), caam_jr_enqueue()
319 void *areq) caam_jr_enqueue()
349 head_entry->cbkarg = areq; caam_jr_enqueue()
316 caam_jr_enqueue(struct device *dev, u32 *desc, void (*cbk)(struct device *dev, u32 *desc, u32 status, void *areq), void *areq) caam_jr_enqueue() argument
H A Dcaamalg.c2842 struct aead_request *req = &greq->areq; aead_giv_edesc_alloc()
3002 static int aead_givencrypt(struct aead_givcrypt_request *areq) aead_givencrypt() argument
3004 struct aead_request *req = &areq->areq; aead_givencrypt()
3014 edesc = aead_giv_edesc_alloc(areq, DESC_JOB_IO_LEN * aead_givencrypt()
3047 static int aead_null_givencrypt(struct aead_givcrypt_request *areq) aead_null_givencrypt() argument
3049 return aead_encrypt(&areq->areq); aead_null_givencrypt()
/linux-4.1.27/include/crypto/
H A Daead.h24 * @areq: The AEAD request itself
30 struct aead_request areq; member in struct:aead_givcrypt_request
36 return crypto_aead_reqtfm(&req->areq); aead_givcrypt_reqtfm()
54 req->areq.base.tfm = crypto_aead_tfm(tfm); aead_givcrypt_set_tfm()
80 aead_request_set_callback(&req->areq, flags, compl, data); aead_givcrypt_set_callback()
88 aead_request_set_crypt(&req->areq, src, dst, nbytes, iv); aead_givcrypt_set_crypt()
95 aead_request_set_assoc(&req->areq, assoc, assoclen); aead_givcrypt_set_assoc()
/linux-4.1.27/crypto/
H A Dseqiv.c70 memcpy(req->areq.iv, subreq->iv, crypto_aead_ivsize(geniv)); seqiv_aead_complete2()
147 struct aead_request *areq = &req->areq; seqiv_aead_givencrypt() local
157 compl = areq->base.complete; seqiv_aead_givencrypt()
158 data = areq->base.data; seqiv_aead_givencrypt()
159 info = areq->iv; seqiv_aead_givencrypt()
165 info = kmalloc(ivsize, areq->base.flags & seqiv_aead_givencrypt()
175 aead_request_set_callback(subreq, areq->base.flags, compl, data); seqiv_aead_givencrypt()
176 aead_request_set_crypt(subreq, areq->src, areq->dst, areq->cryptlen, seqiv_aead_givencrypt()
178 aead_request_set_assoc(subreq, areq->assoc, areq->assoclen); seqiv_aead_givencrypt()
184 if (unlikely(info != areq->iv)) seqiv_aead_givencrypt()
H A Dauthencesn.c96 static void authenc_esn_geniv_ahash_update_done(struct crypto_async_request *areq, authenc_esn_geniv_ahash_update_done() argument
99 struct aead_request *req = areq->data; authenc_esn_geniv_ahash_update_done()
136 static void authenc_esn_geniv_ahash_update_done2(struct crypto_async_request *areq, authenc_esn_geniv_ahash_update_done2() argument
139 struct aead_request *req = areq->data; authenc_esn_geniv_ahash_update_done2()
167 static void authenc_esn_geniv_ahash_done(struct crypto_async_request *areq, authenc_esn_geniv_ahash_done() argument
170 struct aead_request *req = areq->data; authenc_esn_geniv_ahash_done()
188 static void authenc_esn_verify_ahash_update_done(struct crypto_async_request *areq, authenc_esn_verify_ahash_update_done() argument
194 struct aead_request *req = areq->data; authenc_esn_verify_ahash_update_done()
249 static void authenc_esn_verify_ahash_update_done2(struct crypto_async_request *areq, authenc_esn_verify_ahash_update_done2() argument
255 struct aead_request *req = areq->data; authenc_esn_verify_ahash_update_done2()
299 static void authenc_esn_verify_ahash_done(struct crypto_async_request *areq, authenc_esn_verify_ahash_done() argument
305 struct aead_request *req = areq->data; authenc_esn_verify_ahash_done()
455 struct aead_request *areq = req->data; crypto_authenc_esn_encrypt_done() local
458 struct crypto_aead *authenc_esn = crypto_aead_reqtfm(areq); crypto_authenc_esn_encrypt_done()
460 struct ablkcipher_request *abreq = aead_request_ctx(areq); crypto_authenc_esn_encrypt_done()
464 err = crypto_authenc_esn_genicv(areq, iv, 0); crypto_authenc_esn_encrypt_done()
467 authenc_esn_request_complete(areq, err); crypto_authenc_esn_encrypt_done()
500 struct aead_request *areq = req->data; crypto_authenc_esn_givencrypt_done() local
503 struct skcipher_givcrypt_request *greq = aead_request_ctx(areq); crypto_authenc_esn_givencrypt_done()
505 err = crypto_authenc_esn_genicv(areq, greq->giv, 0); crypto_authenc_esn_givencrypt_done()
508 authenc_esn_request_complete(areq, err); crypto_authenc_esn_givencrypt_done()
515 struct aead_request *areq = &req->areq; crypto_authenc_esn_givencrypt() local
516 struct skcipher_givcrypt_request *greq = aead_request_ctx(areq); crypto_authenc_esn_givencrypt()
521 skcipher_givcrypt_set_callback(greq, aead_request_flags(areq), crypto_authenc_esn_givencrypt()
522 crypto_authenc_esn_givencrypt_done, areq); crypto_authenc_esn_givencrypt()
523 skcipher_givcrypt_set_crypt(greq, areq->src, areq->dst, areq->cryptlen, crypto_authenc_esn_givencrypt()
524 areq->iv); crypto_authenc_esn_givencrypt()
531 return crypto_authenc_esn_genicv(areq, iv, CRYPTO_TFM_REQ_MAY_SLEEP); crypto_authenc_esn_givencrypt()
H A Dauthenc.c122 static void authenc_geniv_ahash_update_done(struct crypto_async_request *areq, authenc_geniv_ahash_update_done() argument
125 struct aead_request *req = areq->data; authenc_geniv_ahash_update_done()
152 static void authenc_geniv_ahash_done(struct crypto_async_request *areq, int err) authenc_geniv_ahash_done() argument
154 struct aead_request *req = areq->data; authenc_geniv_ahash_done()
171 static void authenc_verify_ahash_update_done(struct crypto_async_request *areq, authenc_verify_ahash_update_done() argument
177 struct aead_request *req = areq->data; authenc_verify_ahash_update_done()
220 static void authenc_verify_ahash_done(struct crypto_async_request *areq, authenc_verify_ahash_done() argument
226 struct aead_request *req = areq->data; authenc_verify_ahash_done()
378 struct aead_request *areq = req->data; crypto_authenc_encrypt_done() local
381 struct crypto_aead *authenc = crypto_aead_reqtfm(areq); crypto_authenc_encrypt_done()
383 struct authenc_request_ctx *areq_ctx = aead_request_ctx(areq); crypto_authenc_encrypt_done()
388 err = crypto_authenc_genicv(areq, iv, 0); crypto_authenc_encrypt_done()
391 authenc_request_complete(areq, err); crypto_authenc_encrypt_done()
424 struct aead_request *areq = req->data; crypto_authenc_givencrypt_done() local
427 struct skcipher_givcrypt_request *greq = aead_request_ctx(areq); crypto_authenc_givencrypt_done()
429 err = crypto_authenc_genicv(areq, greq->giv, 0); crypto_authenc_givencrypt_done()
432 authenc_request_complete(areq, err); crypto_authenc_givencrypt_done()
439 struct aead_request *areq = &req->areq; crypto_authenc_givencrypt() local
440 struct skcipher_givcrypt_request *greq = aead_request_ctx(areq); crypto_authenc_givencrypt()
445 skcipher_givcrypt_set_callback(greq, aead_request_flags(areq), crypto_authenc_givencrypt()
446 crypto_authenc_givencrypt_done, areq); crypto_authenc_givencrypt()
447 skcipher_givcrypt_set_crypt(greq, areq->src, areq->dst, areq->cryptlen, crypto_authenc_givencrypt()
448 areq->iv); crypto_authenc_givencrypt()
455 return crypto_authenc_genicv(areq, iv, CRYPTO_TFM_REQ_MAY_SLEEP); crypto_authenc_givencrypt()
H A Dpcrypt.c130 aead_request_complete(req->areq.base.data, padata->info); pcrypt_aead_giv_serial()
133 static void pcrypt_aead_done(struct crypto_async_request *areq, int err) pcrypt_aead_done() argument
135 struct aead_request *req = areq->data; pcrypt_aead_done()
245 struct aead_request *areq = &req->areq; pcrypt_aead_givencrypt() local
246 struct pcrypt_request *preq = aead_request_ctx(areq); pcrypt_aead_givencrypt()
251 u32 flags = aead_request_flags(areq); pcrypt_aead_givencrypt()
260 pcrypt_aead_done, areq); pcrypt_aead_givencrypt()
261 aead_givcrypt_set_crypt(creq, areq->src, areq->dst, pcrypt_aead_givencrypt()
262 areq->cryptlen, areq->iv); pcrypt_aead_givencrypt()
263 aead_givcrypt_set_assoc(creq, areq->assoc, areq->assoclen); pcrypt_aead_givencrypt()
H A Dahash.c317 struct ahash_request *areq = req->data; ahash_op_unaligned_done() local
329 ahash_op_unaligned_finish(areq, err); ahash_op_unaligned_done()
332 areq->base.complete(&areq->base, err); ahash_op_unaligned_done()
396 struct ahash_request *areq = req->data; ahash_def_finup_done2() local
398 ahash_def_finup_finish2(areq, err); ahash_def_finup_done2()
400 areq->base.complete(&areq->base, err); ahash_def_finup_done2()
419 struct ahash_request *areq = req->data; ahash_def_finup_done1() local
421 err = ahash_def_finup_finish1(areq, err); ahash_def_finup_done1()
423 areq->base.complete(&areq->base, err); ahash_def_finup_done1()
H A Dgcm.c226 static void gcm_hash_len_done(struct crypto_async_request *areq, int err);
227 static void gcm_hash_final_done(struct crypto_async_request *areq, int err);
301 static void gcm_hash_final_done(struct crypto_async_request *areq, int err) gcm_hash_final_done() argument
303 struct aead_request *req = areq->data; gcm_hash_final_done()
321 static void gcm_hash_len_done(struct crypto_async_request *areq, int err) gcm_hash_len_done() argument
323 struct aead_request *req = areq->data; gcm_hash_len_done()
341 static void gcm_hash_crypt_remain_done(struct crypto_async_request *areq, gcm_hash_crypt_remain_done() argument
344 struct aead_request *req = areq->data; gcm_hash_crypt_remain_done()
367 static void gcm_hash_crypt_done(struct crypto_async_request *areq, int err) gcm_hash_crypt_done() argument
369 struct aead_request *req = areq->data; gcm_hash_crypt_done()
397 static void gcm_hash_assoc_remain_done(struct crypto_async_request *areq, gcm_hash_assoc_remain_done() argument
400 struct aead_request *req = areq->data; gcm_hash_assoc_remain_done()
422 static void gcm_hash_assoc_done(struct crypto_async_request *areq, int err) gcm_hash_assoc_done() argument
424 struct aead_request *req = areq->data; gcm_hash_assoc_done()
451 static void gcm_hash_init_done(struct crypto_async_request *areq, int err) gcm_hash_init_done() argument
453 struct aead_request *req = areq->data; gcm_hash_init_done()
527 static void gcm_encrypt_done(struct crypto_async_request *areq, int err) gcm_encrypt_done() argument
529 struct aead_request *req = areq->data; gcm_encrypt_done()
588 static void gcm_decrypt_done(struct crypto_async_request *areq, int err) gcm_decrypt_done() argument
590 struct aead_request *req = areq->data; gcm_decrypt_done()
1103 static void crypto_rfc4543_done(struct crypto_async_request *areq, int err) crypto_rfc4543_done() argument
1105 struct aead_request *req = areq->data; crypto_rfc4543_done()
H A Dcryptd.c676 static void cryptd_aead_encrypt(struct crypto_async_request *areq, int err) cryptd_aead_encrypt() argument
678 struct cryptd_aead_ctx *ctx = crypto_tfm_ctx(areq->tfm); cryptd_aead_encrypt()
682 req = container_of(areq, struct aead_request, base); cryptd_aead_encrypt()
686 static void cryptd_aead_decrypt(struct crypto_async_request *areq, int err) cryptd_aead_decrypt() argument
688 struct cryptd_aead_ctx *ctx = crypto_tfm_ctx(areq->tfm); cryptd_aead_decrypt()
692 req = container_of(areq, struct aead_request, base); cryptd_aead_decrypt()
H A Dccm.c281 static void crypto_ccm_encrypt_done(struct crypto_async_request *areq, int err) crypto_ccm_encrypt_done() argument
283 struct aead_request *req = areq->data; crypto_ccm_encrypt_done()
356 static void crypto_ccm_decrypt_done(struct crypto_async_request *areq, crypto_ccm_decrypt_done() argument
359 struct aead_request *req = areq->data; crypto_ccm_decrypt_done()
H A Daead.c169 return crypto_aead_encrypt(&req->areq); aead_null_givencrypt()
174 return crypto_aead_decrypt(&req->areq); aead_null_givdecrypt()
H A Dalgif_skcipher.c71 #define GET_SREQ(areq, ctx) (struct skcipher_async_req *)((char *)areq + \
/linux-4.1.27/drivers/crypto/
H A Dtalitos.c791 struct aead_request *areq) ipsec_esp_unmap()
799 talitos_unmap_sg_chain(dev, areq->assoc, DMA_TO_DEVICE); ipsec_esp_unmap()
800 else if (areq->assoclen) ipsec_esp_unmap()
802 dma_unmap_sg(dev, areq->assoc, ipsec_esp_unmap()
806 talitos_sg_unmap(dev, edesc, areq->src, areq->dst); ipsec_esp_unmap()
820 struct aead_request *areq = context; ipsec_esp_encrypt_done() local
821 struct crypto_aead *authenc = crypto_aead_reqtfm(areq); ipsec_esp_encrypt_done()
829 ipsec_esp_unmap(dev, edesc, areq); ipsec_esp_encrypt_done()
836 sg = sg_last(areq->dst, edesc->dst_nents); ipsec_esp_encrypt_done()
843 aead_request_complete(areq, err); ipsec_esp_encrypt_done()
940 static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq, ipsec_esp() argument
945 struct crypto_aead *aead = crypto_aead_reqtfm(areq); ipsec_esp()
949 unsigned int cryptlen = areq->cryptlen; ipsec_esp()
960 desc->ptr[1].len = cpu_to_be16(areq->assoclen + ivsize); ipsec_esp()
970 sg_count = sg_to_link_tbl(areq->assoc, edesc->assoc_nents - 1, ipsec_esp()
971 areq->assoclen, tbl_ptr); ipsec_esp()
984 if (areq->assoclen) ipsec_esp()
986 sg_dma_address(areq->assoc)); ipsec_esp()
1013 sg_count = talitos_map_sg(dev, areq->src, edesc->src_nents ? : 1, ipsec_esp()
1014 (areq->src == areq->dst) ? DMA_BIDIRECTIONAL ipsec_esp()
1019 to_talitos_ptr(&desc->ptr[4], sg_dma_address(areq->src)); ipsec_esp()
1026 sg_count = sg_to_link_tbl(areq->src, sg_count, sg_link_tbl_len, ipsec_esp()
1037 sg_dma_address(areq->src)); ipsec_esp()
1045 if (areq->src != areq->dst) ipsec_esp()
1046 sg_count = talitos_map_sg(dev, areq->dst, ipsec_esp()
1051 to_talitos_ptr(&desc->ptr[5], sg_dma_address(areq->dst)); ipsec_esp()
1058 sg_count = sg_to_link_tbl(areq->dst, sg_count, cryptlen, ipsec_esp()
1082 ret = talitos_submit(dev, ctx->ch, desc, callback, areq); ipsec_esp()
1084 ipsec_esp_unmap(dev, edesc, areq); ipsec_esp()
1217 static struct talitos_edesc *aead_edesc_alloc(struct aead_request *areq, u8 *iv, aead_edesc_alloc() argument
1220 struct crypto_aead *authenc = crypto_aead_reqtfm(areq); aead_edesc_alloc()
1224 return talitos_edesc_alloc(ctx->dev, areq->assoc, areq->src, areq->dst, aead_edesc_alloc()
1225 iv, areq->assoclen, areq->cryptlen, aead_edesc_alloc()
1227 areq->base.flags, encrypt); aead_edesc_alloc()
1300 struct aead_request *areq = &req->areq; aead_givencrypt() local
1301 struct crypto_aead *authenc = crypto_aead_reqtfm(areq); aead_givencrypt()
1306 edesc = aead_edesc_alloc(areq, req->giv, 0, true); aead_givencrypt()
1317 return ipsec_esp(edesc, areq, req->seq, ipsec_esp_encrypt_done); aead_givencrypt()
1333 struct ablkcipher_request *areq) common_nonsnoop_unmap()
1339 talitos_sg_unmap(dev, edesc, areq->src, areq->dst); common_nonsnoop_unmap()
1350 struct ablkcipher_request *areq = context; ablkcipher_done() local
1355 common_nonsnoop_unmap(dev, edesc, areq); ablkcipher_done()
1359 areq->base.complete(&areq->base, err); ablkcipher_done()
1363 struct ablkcipher_request *areq, common_nonsnoop()
1368 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); common_nonsnoop()
1372 unsigned int cryptlen = areq->nbytes; common_nonsnoop()
1396 sg_count = talitos_map_sg(dev, areq->src, edesc->src_nents ? : 1, common_nonsnoop()
1397 (areq->src == areq->dst) ? DMA_BIDIRECTIONAL common_nonsnoop()
1402 to_talitos_ptr(&desc->ptr[3], sg_dma_address(areq->src)); common_nonsnoop()
1404 sg_count = sg_to_link_tbl(areq->src, sg_count, cryptlen, common_nonsnoop()
1415 sg_dma_address(areq->src)); common_nonsnoop()
1423 if (areq->src != areq->dst) common_nonsnoop()
1424 sg_count = talitos_map_sg(dev, areq->dst, common_nonsnoop()
1429 to_talitos_ptr(&desc->ptr[4], sg_dma_address(areq->dst)); common_nonsnoop()
1438 sg_count = sg_to_link_tbl(areq->dst, sg_count, cryptlen, common_nonsnoop()
1453 ret = talitos_submit(dev, ctx->ch, desc, callback, areq); common_nonsnoop()
1455 common_nonsnoop_unmap(dev, edesc, areq); common_nonsnoop()
1462 areq, bool encrypt) ablkcipher_edesc_alloc()
1464 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); ablkcipher_edesc_alloc()
1468 return talitos_edesc_alloc(ctx->dev, NULL, areq->src, areq->dst, ablkcipher_edesc_alloc()
1469 areq->info, 0, areq->nbytes, 0, ivsize, 0, ablkcipher_edesc_alloc()
1470 areq->base.flags, encrypt); ablkcipher_edesc_alloc()
1473 static int ablkcipher_encrypt(struct ablkcipher_request *areq) ablkcipher_encrypt() argument
1475 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); ablkcipher_encrypt()
1480 edesc = ablkcipher_edesc_alloc(areq, true); ablkcipher_encrypt()
1487 return common_nonsnoop(edesc, areq, ablkcipher_done); ablkcipher_encrypt()
1490 static int ablkcipher_decrypt(struct ablkcipher_request *areq) ablkcipher_decrypt() argument
1492 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); ablkcipher_decrypt()
1497 edesc = ablkcipher_edesc_alloc(areq, false); ablkcipher_decrypt()
1503 return common_nonsnoop(edesc, areq, ablkcipher_done); ablkcipher_decrypt()
1508 struct ahash_request *areq) common_nonsnoop_hash_unmap()
1510 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); common_nonsnoop_hash_unmap()
1535 struct ahash_request *areq = context; ahash_done() local
1538 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); ahash_done()
1545 common_nonsnoop_hash_unmap(dev, edesc, areq); ahash_done()
1549 areq->base.complete(&areq->base, err); ahash_done()
1553 struct ahash_request *areq, unsigned int length, common_nonsnoop_hash()
1558 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); common_nonsnoop_hash()
1560 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); common_nonsnoop_hash()
1624 areq->result, 0, DMA_FROM_DEVICE); common_nonsnoop_hash()
1633 ret = talitos_submit(dev, ctx->ch, desc, callback, areq); common_nonsnoop_hash()
1635 common_nonsnoop_hash_unmap(dev, edesc, areq); common_nonsnoop_hash()
1641 static struct talitos_edesc *ahash_edesc_alloc(struct ahash_request *areq, ahash_edesc_alloc() argument
1644 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); ahash_edesc_alloc()
1646 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); ahash_edesc_alloc()
1649 nbytes, 0, 0, 0, areq->base.flags, false); ahash_edesc_alloc()
1652 static int ahash_init(struct ahash_request *areq) ahash_init() argument
1654 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); ahash_init()
1655 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); ahash_init()
1673 static int ahash_init_sha224_swinit(struct ahash_request *areq) ahash_init_sha224_swinit() argument
1675 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); ahash_init_sha224_swinit()
1677 ahash_init(areq); ahash_init_sha224_swinit()
1696 static int ahash_process_req(struct ahash_request *areq, unsigned int nbytes) ahash_process_req() argument
1698 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); ahash_process_req()
1700 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); ahash_process_req()
1711 sg_copy_to_buffer(areq->src, ahash_process_req()
1712 sg_count(areq->src, nbytes, &chained), ahash_process_req()
1739 scatterwalk_sg_chain(req_ctx->bufsl, 2, areq->src); ahash_process_req()
1742 req_ctx->psrc = areq->src; ahash_process_req()
1745 int nents = sg_count(areq->src, nbytes, &chained); ahash_process_req()
1746 sg_pcopy_to_buffer(areq->src, nents, ahash_process_req()
1754 edesc = ahash_edesc_alloc(areq, nbytes_to_hash); ahash_process_req()
1776 return common_nonsnoop_hash(edesc, areq, nbytes_to_hash, ahash_process_req()
1780 static int ahash_update(struct ahash_request *areq) ahash_update() argument
1782 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); ahash_update()
1786 return ahash_process_req(areq, areq->nbytes); ahash_update()
1789 static int ahash_final(struct ahash_request *areq) ahash_final() argument
1791 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); ahash_final()
1795 return ahash_process_req(areq, 0); ahash_final()
1798 static int ahash_finup(struct ahash_request *areq) ahash_finup() argument
1800 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); ahash_finup()
1804 return ahash_process_req(areq, areq->nbytes); ahash_finup()
1807 static int ahash_digest(struct ahash_request *areq) ahash_digest() argument
1809 struct talitos_ahash_req_ctx *req_ctx = ahash_request_ctx(areq); ahash_digest()
1810 struct crypto_ahash *ahash = crypto_ahash_reqtfm(areq); ahash_digest()
1812 ahash->init(areq); ahash_digest()
1815 return ahash_process_req(areq, areq->nbytes); ahash_digest()
789 ipsec_esp_unmap(struct device *dev, struct talitos_edesc *edesc, struct aead_request *areq) ipsec_esp_unmap() argument
1331 common_nonsnoop_unmap(struct device *dev, struct talitos_edesc *edesc, struct ablkcipher_request *areq) common_nonsnoop_unmap() argument
1362 common_nonsnoop(struct talitos_edesc *edesc, struct ablkcipher_request *areq, void (*callback) (struct device *dev, struct talitos_desc *desc, void *context, int error)) common_nonsnoop() argument
1461 ablkcipher_edesc_alloc(struct ablkcipher_request * areq, bool encrypt) ablkcipher_edesc_alloc() argument
1506 common_nonsnoop_hash_unmap(struct device *dev, struct talitos_edesc *edesc, struct ahash_request *areq) common_nonsnoop_hash_unmap() argument
1552 common_nonsnoop_hash(struct talitos_edesc *edesc, struct ahash_request *areq, unsigned int length, void (*callback) (struct device *dev, struct talitos_desc *desc, void *context, int error)) common_nonsnoop_hash() argument
H A Dpicoxcell_crypto.c323 struct aead_request *areq = container_of(req->req, struct aead_request, spacc_aead_make_ddts() local
327 unsigned ivsize = crypto_aead_ivsize(crypto_aead_reqtfm(areq)); spacc_aead_make_ddts()
328 unsigned nents = sg_count(areq->src, areq->cryptlen); spacc_aead_make_ddts()
332 u8 *iv = giv ? giv : areq->iv; spacc_aead_make_ddts()
347 assoc_ents = dma_map_sg(engine->dev, areq->assoc, spacc_aead_make_ddts()
348 sg_count(areq->assoc, areq->assoclen), DMA_TO_DEVICE); spacc_aead_make_ddts()
349 if (areq->src != areq->dst) { spacc_aead_make_ddts()
350 src_ents = dma_map_sg(engine->dev, areq->src, nents, spacc_aead_make_ddts()
352 dst_ents = dma_map_sg(engine->dev, areq->dst, nents, spacc_aead_make_ddts()
355 src_ents = dma_map_sg(engine->dev, areq->src, nents, spacc_aead_make_ddts()
372 for_each_sg(areq->assoc, cur, assoc_ents, i) { spacc_aead_make_ddts()
387 for_each_sg(areq->src, cur, src_ents, i) { spacc_aead_make_ddts()
389 if (areq->src == areq->dst) spacc_aead_make_ddts()
394 for_each_sg(areq->dst, cur, dst_ents, i) spacc_aead_make_ddts()
406 struct aead_request *areq = container_of(req->req, struct aead_request, spacc_aead_free_ddts() local
412 unsigned nents = sg_count(areq->src, areq->cryptlen); spacc_aead_free_ddts()
414 if (areq->src != areq->dst) { spacc_aead_free_ddts()
415 dma_unmap_sg(engine->dev, areq->src, nents, DMA_TO_DEVICE); spacc_aead_free_ddts()
416 dma_unmap_sg(engine->dev, areq->dst, spacc_aead_free_ddts()
417 sg_count(areq->dst, areq->cryptlen), spacc_aead_free_ddts()
420 dma_unmap_sg(engine->dev, areq->src, nents, DMA_BIDIRECTIONAL); spacc_aead_free_ddts()
422 dma_unmap_sg(engine->dev, areq->assoc, spacc_aead_free_ddts()
423 sg_count(areq->assoc, areq->assoclen), DMA_TO_DEVICE); spacc_aead_free_ddts()
746 memcpy(req->areq.iv, ctx->salt, ivsize); spacc_aead_givencrypt()
755 return spacc_aead_setup(&req->areq, req->giv, alg->type, 1); spacc_aead_givencrypt()
H A Dixp4xx_crypto.c1199 memcpy(req->areq.iv, ctx->salt, ivsize); aead_givencrypt()
1207 return aead_perform(&req->areq, 1, req->areq.assoclen, aead_givencrypt()
1208 req->areq.cryptlen +ivsize, req->giv); aead_givencrypt()
/linux-4.1.27/drivers/crypto/qat/qat_common/
H A Dqat_algs.c803 struct aead_request *areq = qat_req->aead_req; qat_aead_alg_callback() local
810 areq->base.complete(&areq->base, res); qat_aead_alg_callback()
818 struct ablkcipher_request *areq = qat_req->ablkcipher_req; qat_ablkcipher_alg_callback() local
825 areq->base.complete(&areq->base, res); qat_ablkcipher_alg_callback()
837 static int qat_alg_aead_dec(struct aead_request *areq) qat_alg_aead_dec() argument
839 struct crypto_aead *aead_tfm = crypto_aead_reqtfm(areq); qat_alg_aead_dec()
842 struct qat_crypto_request *qat_req = aead_request_ctx(areq); qat_alg_aead_dec()
849 ret = qat_alg_sgl_to_bufl(ctx->inst, areq->assoc, areq->src, areq->dst, qat_alg_aead_dec()
850 areq->iv, AES_BLOCK_SIZE, qat_req); qat_alg_aead_dec()
857 qat_req->aead_req = areq; qat_alg_aead_dec()
863 cipher_param->cipher_length = areq->cryptlen - digst_size; qat_alg_aead_dec()
864 cipher_param->cipher_offset = areq->assoclen + AES_BLOCK_SIZE; qat_alg_aead_dec()
865 memcpy(cipher_param->u.cipher_IV_array, areq->iv, AES_BLOCK_SIZE); qat_alg_aead_dec()
868 auth_param->auth_len = areq->assoclen + qat_alg_aead_dec()
881 static int qat_alg_aead_enc_internal(struct aead_request *areq, uint8_t *iv, qat_alg_aead_enc_internal() argument
884 struct crypto_aead *aead_tfm = crypto_aead_reqtfm(areq); qat_alg_aead_enc_internal()
887 struct qat_crypto_request *qat_req = aead_request_ctx(areq); qat_alg_aead_enc_internal()
893 ret = qat_alg_sgl_to_bufl(ctx->inst, areq->assoc, areq->src, areq->dst, qat_alg_aead_enc_internal()
901 qat_req->aead_req = areq; qat_alg_aead_enc_internal()
910 cipher_param->cipher_length = areq->cryptlen + AES_BLOCK_SIZE; qat_alg_aead_enc_internal()
911 cipher_param->cipher_offset = areq->assoclen; qat_alg_aead_enc_internal()
914 cipher_param->cipher_length = areq->cryptlen; qat_alg_aead_enc_internal()
915 cipher_param->cipher_offset = areq->assoclen + AES_BLOCK_SIZE; qat_alg_aead_enc_internal()
918 auth_param->auth_len = areq->assoclen + areq->cryptlen + AES_BLOCK_SIZE; qat_alg_aead_enc_internal()
931 static int qat_alg_aead_enc(struct aead_request *areq) qat_alg_aead_enc() argument
933 return qat_alg_aead_enc_internal(areq, areq->iv, 0); qat_alg_aead_enc()
938 struct crypto_aead *aead_tfm = crypto_aead_reqtfm(&req->areq); qat_alg_aead_genivenc()
947 return qat_alg_aead_enc_internal(&req->areq, req->giv, 1); qat_alg_aead_genivenc()
/linux-4.1.27/include/crypto/internal/
H A Daead.h72 return aead_request_ctx(&req->areq); aead_givcrypt_reqctx()
78 aead_request_complete(&req->areq, err); aead_givcrypt_complete()
/linux-4.1.27/drivers/crypto/ux500/cryp/
H A Dcryp_core.c824 static int ablk_dma_crypt(struct ablkcipher_request *areq) ablk_dma_crypt() argument
826 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); ablk_dma_crypt()
836 ctx->datalen = areq->nbytes; ablk_dma_crypt()
837 ctx->outlen = areq->nbytes; ablk_dma_crypt()
848 ctx->device->dma.nents_src = get_nents(areq->src, ctx->datalen); ablk_dma_crypt()
849 ctx->device->dma.nents_dst = get_nents(areq->dst, ctx->outlen); ablk_dma_crypt()
854 bytes_written = cryp_dma_write(ctx, areq->src, ctx->datalen); ablk_dma_crypt()
855 bytes_read = cryp_dma_read(ctx, areq->dst, bytes_written); ablk_dma_crypt()
881 static int ablk_crypt(struct ablkcipher_request *areq) ablk_crypt() argument
884 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); ablk_crypt()
898 ablkcipher_walk_init(&walk, areq->dst, areq->src, areq->nbytes); ablk_crypt()
899 ret = ablkcipher_walk_phys(areq, &walk); ablk_crypt()
922 ret = ablkcipher_walk_done(areq, &walk, nbytes); ablk_crypt()
1053 static int cryp_blk_encrypt(struct ablkcipher_request *areq) cryp_blk_encrypt() argument
1055 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); cryp_blk_encrypt()
1065 return ablk_dma_crypt(areq); cryp_blk_encrypt()
1068 return ablk_crypt(areq); cryp_blk_encrypt()
1071 static int cryp_blk_decrypt(struct ablkcipher_request *areq) cryp_blk_decrypt() argument
1073 struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); cryp_blk_decrypt()
1082 return ablk_dma_crypt(areq); cryp_blk_decrypt()
1085 return ablk_crypt(areq); cryp_blk_decrypt()
/linux-4.1.27/drivers/mmc/core/
H A Dcore.c418 err = host->areq->err_check(host->card, mmc_wait_for_data_req_done()
419 host->areq); mmc_wait_for_data_req_done()
523 * @areq: async request to start
537 struct mmc_async_req *areq, int *error) mmc_start_req()
541 struct mmc_async_req *data = host->areq; mmc_start_req()
544 if (areq) mmc_start_req()
545 mmc_pre_req(host, areq->mrq, !host->areq); mmc_start_req()
547 if (host->areq) { mmc_start_req()
548 err = mmc_wait_for_data_req_done(host, host->areq->mrq, areq); mmc_start_req()
562 ((mmc_resp_type(host->areq->mrq->cmd) == MMC_RSP_R1) || mmc_start_req()
563 (mmc_resp_type(host->areq->mrq->cmd) == MMC_RSP_R1B)) && mmc_start_req()
564 (host->areq->mrq->cmd->resp[0] & R1_EXCEPTION_EVENT)) { mmc_start_req()
567 if (areq) mmc_start_req()
568 mmc_post_req(host, areq->mrq, -EINVAL); mmc_start_req()
573 if (areq) mmc_start_req()
574 mmc_pre_req(host, areq->mrq, !host->areq); mmc_start_req()
578 if (!err && areq) mmc_start_req()
579 start_err = __mmc_start_data_req(host, areq->mrq); mmc_start_req()
581 if (host->areq) mmc_start_req()
582 mmc_post_req(host, host->areq->mrq, 0); mmc_start_req()
585 if ((err || start_err) && areq) mmc_start_req()
586 mmc_post_req(host, areq->mrq, -EINVAL); mmc_start_req()
589 host->areq = NULL; mmc_start_req()
591 host->areq = areq; mmc_start_req()
536 mmc_start_req(struct mmc_host *host, struct mmc_async_req *areq, int *error) mmc_start_req() argument
/linux-4.1.27/drivers/mmc/card/
H A Dblock.c1203 struct mmc_async_req *areq) mmc_blk_err_check()
1205 struct mmc_queue_req *mq_mrq = container_of(areq, struct mmc_queue_req, mmc_blk_err_check()
1308 struct mmc_async_req *areq) mmc_blk_packed_err_check()
1310 struct mmc_queue_req *mq_rq = container_of(areq, struct mmc_queue_req, mmc_blk_packed_err_check()
1320 check = mmc_blk_err_check(card, areq); mmc_blk_packed_err_check()
1839 struct mmc_async_req *areq; mmc_blk_issue_rw_rq() local
1868 areq = &mq->mqrq_cur->mmc_active; mmc_blk_issue_rw_rq()
1870 areq = NULL; mmc_blk_issue_rw_rq()
1871 areq = mmc_start_req(card->host, areq, (int *) &status); mmc_blk_issue_rw_rq()
1872 if (!areq) { mmc_blk_issue_rw_rq()
1878 mq_rq = container_of(areq, struct mmc_queue_req, mmc_active); mmc_blk_issue_rw_rq()
2045 if (card->host->areq) mmc_blk_issue_rq()
2053 if (card->host->areq) mmc_blk_issue_rq()
2057 if (!req && host->areq) { mmc_blk_issue_rq()
1202 mmc_blk_err_check(struct mmc_card *card, struct mmc_async_req *areq) mmc_blk_err_check() argument
1307 mmc_blk_packed_err_check(struct mmc_card *card, struct mmc_async_req *areq) mmc_blk_packed_err_check() argument
H A Dmmc_test.c171 struct mmc_async_req areq; member in struct:mmc_test_async_req
719 struct mmc_async_req *areq) mmc_test_check_result_async()
722 container_of(areq, struct mmc_test_async_req, areq); mmc_test_check_result_async()
726 return mmc_test_check_result(test_async->test, areq->mrq); mmc_test_check_result_async()
797 struct mmc_async_req *cur_areq = &test_areq[0].areq; mmc_test_nonblock_transfer()
798 struct mmc_async_req *other_areq = &test_areq[1].areq; mmc_test_nonblock_transfer()
718 mmc_test_check_result_async(struct mmc_card *card, struct mmc_async_req *areq) mmc_test_check_result_async() argument
/linux-4.1.27/include/linux/mmc/
H A Dhost.h359 struct mmc_async_req *areq; /* active async req */ member in struct:mmc_host

Completed in 455 milliseconds