Lines Matching refs:req_ctx
386 struct cipher_req_ctx *req_ctx, in cc_setup_cipher_desc() argument
395 int direction = req_ctx->gen_ctx.op_type; in cc_setup_cipher_desc()
398 dma_addr_t iv_dma_addr = req_ctx->gen_ctx.iv_dma_addr; in cc_setup_cipher_desc()
508 struct cipher_req_ctx *req_ctx, in cc_setup_cipher_data() argument
530 if (req_ctx->dma_buf_type == CC_DMA_BUF_DLLI) { in cc_setup_cipher_data()
548 &req_ctx->mlli_params.mlli_dma_addr, in cc_setup_cipher_data()
549 req_ctx->mlli_params.mlli_len, in cc_setup_cipher_data()
553 req_ctx->mlli_params.mlli_dma_addr, in cc_setup_cipher_data()
554 req_ctx->mlli_params.mlli_len, NS_BIT); in cc_setup_cipher_data()
557 req_ctx->mlli_params.mlli_len); in cc_setup_cipher_data()
564 req_ctx->in_mlli_nents, NS_BIT); in cc_setup_cipher_data()
565 if (req_ctx->out_nents == 0) { in cc_setup_cipher_data()
571 req_ctx->in_mlli_nents, NS_BIT, in cc_setup_cipher_data()
577 (u32)LLI_ENTRY_BYTE_SIZE * req_ctx->in_nents); in cc_setup_cipher_data()
581 req_ctx->in_mlli_nents)), in cc_setup_cipher_data()
582 req_ctx->out_mlli_nents, NS_BIT, in cc_setup_cipher_data()
630 struct cipher_req_ctx *req_ctx = skcipher_request_ctx(req); in cc_cipher_complete() local
646 if (req_ctx->gen_ctx.op_type == DRV_CRYPTO_DIRECTION_DECRYPT) { in cc_cipher_complete()
647 memcpy(req->iv, req_ctx->backup_info, ivsize); in cc_cipher_complete()
648 kzfree(req_ctx->backup_info); in cc_cipher_complete()
666 cc_unmap_cipher_request(dev, req_ctx, ivsize, src, dst); in cc_cipher_complete()
667 kzfree(req_ctx->iv); in cc_cipher_complete()
677 struct cipher_req_ctx *req_ctx = skcipher_request_ctx(req); in cc_cipher_process() local
713 req_ctx->iv = kmemdup(iv, ivsize, flags); in cc_cipher_process()
714 if (!req_ctx->iv) { in cc_cipher_process()
724 req_ctx->gen_ctx.op_type = direction; in cc_cipher_process()
728 rc = cc_map_cipher_request(ctx_p->drvdata, req_ctx, ivsize, nbytes, in cc_cipher_process()
729 req_ctx->iv, src, dst, flags); in cc_cipher_process()
738 cc_setup_cipher_desc(tfm, req_ctx, ivsize, nbytes, desc, &seq_len); in cc_cipher_process()
740 cc_setup_cipher_data(tfm, req_ctx, dst, src, nbytes, req, desc, in cc_cipher_process()
751 cc_unmap_cipher_request(dev, req_ctx, ivsize, src, dst); in cc_cipher_process()
756 kzfree(req_ctx->backup_info); in cc_cipher_process()
757 kzfree(req_ctx->iv); in cc_cipher_process()
765 struct cipher_req_ctx *req_ctx = skcipher_request_ctx(req); in cc_cipher_encrypt() local
767 memset(req_ctx, 0, sizeof(*req_ctx)); in cc_cipher_encrypt()
777 struct cipher_req_ctx *req_ctx = skcipher_request_ctx(req); in cc_cipher_decrypt() local
782 memset(req_ctx, 0, sizeof(*req_ctx)); in cc_cipher_decrypt()
789 req_ctx->backup_info = kzalloc(ivsize, flags); in cc_cipher_decrypt()
790 if (!req_ctx->backup_info) in cc_cipher_decrypt()
794 scatterwalk_map_and_copy(req_ctx->backup_info, req->src, len, in cc_cipher_decrypt()