Lines Matching refs:rctx

29 	struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req);  in qce_ablkcipher_done()  local
47 dma_unmap_sg(qce->dev, rctx->src_sg, rctx->src_nents, dir_src); in qce_ablkcipher_done()
48 dma_unmap_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_ablkcipher_done()
50 sg_free_table(&rctx->dst_tbl); in qce_ablkcipher_done()
63 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_ablkcipher_async_req_handle() local
73 rctx->iv = req->info; in qce_ablkcipher_async_req_handle()
74 rctx->ivsize = crypto_ablkcipher_ivsize(ablkcipher); in qce_ablkcipher_async_req_handle()
75 rctx->cryptlen = req->nbytes; in qce_ablkcipher_async_req_handle()
81 rctx->src_nents = sg_nents_for_len(req->src, req->nbytes); in qce_ablkcipher_async_req_handle()
83 rctx->dst_nents = sg_nents_for_len(req->dst, req->nbytes); in qce_ablkcipher_async_req_handle()
85 rctx->dst_nents = rctx->src_nents; in qce_ablkcipher_async_req_handle()
87 rctx->dst_nents += 1; in qce_ablkcipher_async_req_handle()
92 ret = sg_alloc_table(&rctx->dst_tbl, rctx->dst_nents, gfp); in qce_ablkcipher_async_req_handle()
96 sg_init_one(&rctx->result_sg, qce->dma.result_buf, QCE_RESULT_BUF_SZ); in qce_ablkcipher_async_req_handle()
98 sg = qce_sgtable_add(&rctx->dst_tbl, req->dst); in qce_ablkcipher_async_req_handle()
104 sg = qce_sgtable_add(&rctx->dst_tbl, &rctx->result_sg); in qce_ablkcipher_async_req_handle()
111 rctx->dst_sg = rctx->dst_tbl.sgl; in qce_ablkcipher_async_req_handle()
113 ret = dma_map_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_ablkcipher_async_req_handle()
118 ret = dma_map_sg(qce->dev, req->src, rctx->src_nents, dir_src); in qce_ablkcipher_async_req_handle()
121 rctx->src_sg = req->src; in qce_ablkcipher_async_req_handle()
123 rctx->src_sg = rctx->dst_sg; in qce_ablkcipher_async_req_handle()
126 ret = qce_dma_prep_sgs(&qce->dma, rctx->src_sg, rctx->src_nents, in qce_ablkcipher_async_req_handle()
127 rctx->dst_sg, rctx->dst_nents, in qce_ablkcipher_async_req_handle()
144 dma_unmap_sg(qce->dev, req->src, rctx->src_nents, dir_src); in qce_ablkcipher_async_req_handle()
146 dma_unmap_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst); in qce_ablkcipher_async_req_handle()
148 sg_free_table(&rctx->dst_tbl); in qce_ablkcipher_async_req_handle()
198 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_ablkcipher_crypt() local
202 rctx->flags = tmpl->alg_flags; in qce_ablkcipher_crypt()
203 rctx->flags |= encrypt ? QCE_ENCRYPT : QCE_DECRYPT; in qce_ablkcipher_crypt()
205 if (IS_AES(rctx->flags) && ctx->enc_keylen != AES_KEYSIZE_128 && in qce_ablkcipher_crypt()