Lines Matching refs:req_ctx
471 struct cipher_req_ctx *req_ctx, in cc_setup_readiv_desc() argument
479 int direction = req_ctx->gen_ctx.op_type; in cc_setup_readiv_desc()
480 dma_addr_t iv_dma_addr = req_ctx->gen_ctx.iv_dma_addr; in cc_setup_readiv_desc()
527 struct cipher_req_ctx *req_ctx, in cc_setup_state_desc() argument
536 int direction = req_ctx->gen_ctx.op_type; in cc_setup_state_desc()
539 dma_addr_t iv_dma_addr = req_ctx->gen_ctx.iv_dma_addr; in cc_setup_state_desc()
623 struct cipher_req_ctx *req_ctx, in cc_setup_key_desc() argument
631 int direction = req_ctx->gen_ctx.op_type; in cc_setup_key_desc()
706 struct cipher_req_ctx *req_ctx, in cc_setup_mlli_desc() argument
714 if (req_ctx->dma_buf_type == CC_DMA_BUF_MLLI) { in cc_setup_mlli_desc()
717 &req_ctx->mlli_params.mlli_dma_addr, in cc_setup_mlli_desc()
718 req_ctx->mlli_params.mlli_len, in cc_setup_mlli_desc()
722 req_ctx->mlli_params.mlli_dma_addr, in cc_setup_mlli_desc()
723 req_ctx->mlli_params.mlli_len, NS_BIT); in cc_setup_mlli_desc()
726 req_ctx->mlli_params.mlli_len); in cc_setup_mlli_desc()
733 struct cipher_req_ctx *req_ctx, in cc_setup_flow_desc() argument
745 if (req_ctx->dma_buf_type == CC_DMA_BUF_DLLI) { in cc_setup_flow_desc()
764 req_ctx->in_mlli_nents, NS_BIT); in cc_setup_flow_desc()
765 if (req_ctx->out_nents == 0) { in cc_setup_flow_desc()
771 req_ctx->in_mlli_nents, NS_BIT, in cc_setup_flow_desc()
777 (u32)LLI_ENTRY_BYTE_SIZE * req_ctx->in_nents); in cc_setup_flow_desc()
781 req_ctx->in_mlli_nents)), in cc_setup_flow_desc()
782 req_ctx->out_mlli_nents, NS_BIT, in cc_setup_flow_desc()
798 struct cipher_req_ctx *req_ctx = skcipher_request_ctx(req); in cc_cipher_complete() local
804 cc_unmap_cipher_request(dev, req_ctx, ivsize, src, dst); in cc_cipher_complete()
805 memcpy(req->iv, req_ctx->iv, ivsize); in cc_cipher_complete()
806 kzfree(req_ctx->iv); in cc_cipher_complete()
817 struct cipher_req_ctx *req_ctx = skcipher_request_ctx(req); in cc_cipher_process() local
853 req_ctx->iv = kmemdup(iv, ivsize, flags); in cc_cipher_process()
854 if (!req_ctx->iv) { in cc_cipher_process()
871 req_ctx->gen_ctx.op_type = direction; in cc_cipher_process()
875 rc = cc_map_cipher_request(ctx_p->drvdata, req_ctx, ivsize, nbytes, in cc_cipher_process()
876 req_ctx->iv, src, dst, flags); in cc_cipher_process()
885 cc_setup_state_desc(tfm, req_ctx, ivsize, nbytes, desc, &seq_len); in cc_cipher_process()
887 cc_setup_mlli_desc(tfm, req_ctx, dst, src, nbytes, req, desc, &seq_len); in cc_cipher_process()
889 cc_setup_key_desc(tfm, req_ctx, nbytes, desc, &seq_len); in cc_cipher_process()
891 cc_setup_flow_desc(tfm, req_ctx, dst, src, nbytes, desc, &seq_len); in cc_cipher_process()
893 cc_setup_readiv_desc(tfm, req_ctx, ivsize, desc, &seq_len); in cc_cipher_process()
903 cc_unmap_cipher_request(dev, req_ctx, ivsize, src, dst); in cc_cipher_process()
908 kzfree(req_ctx->iv); in cc_cipher_process()
916 struct cipher_req_ctx *req_ctx = skcipher_request_ctx(req); in cc_cipher_encrypt() local
918 memset(req_ctx, 0, sizeof(*req_ctx)); in cc_cipher_encrypt()
925 struct cipher_req_ctx *req_ctx = skcipher_request_ctx(req); in cc_cipher_decrypt() local
927 memset(req_ctx, 0, sizeof(*req_ctx)); in cc_cipher_decrypt()