Lines Matching refs:rctx

29 	struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req);  in qce_ablkcipher_done()  local
47 qce_unmapsg(qce->dev, rctx->src_sg, rctx->src_nents, dir_src, in qce_ablkcipher_done()
48 rctx->dst_chained); in qce_ablkcipher_done()
49 qce_unmapsg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst, in qce_ablkcipher_done()
50 rctx->dst_chained); in qce_ablkcipher_done()
52 sg_free_table(&rctx->dst_tbl); in qce_ablkcipher_done()
65 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_ablkcipher_async_req_handle() local
75 rctx->iv = req->info; in qce_ablkcipher_async_req_handle()
76 rctx->ivsize = crypto_ablkcipher_ivsize(ablkcipher); in qce_ablkcipher_async_req_handle()
77 rctx->cryptlen = req->nbytes; in qce_ablkcipher_async_req_handle()
83 rctx->src_nents = qce_countsg(req->src, req->nbytes, in qce_ablkcipher_async_req_handle()
84 &rctx->src_chained); in qce_ablkcipher_async_req_handle()
86 rctx->dst_nents = qce_countsg(req->dst, req->nbytes, in qce_ablkcipher_async_req_handle()
87 &rctx->dst_chained); in qce_ablkcipher_async_req_handle()
89 rctx->dst_nents = rctx->src_nents; in qce_ablkcipher_async_req_handle()
90 rctx->dst_chained = rctx->src_chained; in qce_ablkcipher_async_req_handle()
93 rctx->dst_nents += 1; in qce_ablkcipher_async_req_handle()
98 ret = sg_alloc_table(&rctx->dst_tbl, rctx->dst_nents, gfp); in qce_ablkcipher_async_req_handle()
102 sg_init_one(&rctx->result_sg, qce->dma.result_buf, QCE_RESULT_BUF_SZ); in qce_ablkcipher_async_req_handle()
104 sg = qce_sgtable_add(&rctx->dst_tbl, req->dst); in qce_ablkcipher_async_req_handle()
110 sg = qce_sgtable_add(&rctx->dst_tbl, &rctx->result_sg); in qce_ablkcipher_async_req_handle()
117 rctx->dst_sg = rctx->dst_tbl.sgl; in qce_ablkcipher_async_req_handle()
119 ret = qce_mapsg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst, in qce_ablkcipher_async_req_handle()
120 rctx->dst_chained); in qce_ablkcipher_async_req_handle()
125 ret = qce_mapsg(qce->dev, req->src, rctx->src_nents, dir_src, in qce_ablkcipher_async_req_handle()
126 rctx->src_chained); in qce_ablkcipher_async_req_handle()
129 rctx->src_sg = req->src; in qce_ablkcipher_async_req_handle()
131 rctx->src_sg = rctx->dst_sg; in qce_ablkcipher_async_req_handle()
134 ret = qce_dma_prep_sgs(&qce->dma, rctx->src_sg, rctx->src_nents, in qce_ablkcipher_async_req_handle()
135 rctx->dst_sg, rctx->dst_nents, in qce_ablkcipher_async_req_handle()
152 qce_unmapsg(qce->dev, req->src, rctx->src_nents, dir_src, in qce_ablkcipher_async_req_handle()
153 rctx->src_chained); in qce_ablkcipher_async_req_handle()
155 qce_unmapsg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst, in qce_ablkcipher_async_req_handle()
156 rctx->dst_chained); in qce_ablkcipher_async_req_handle()
158 sg_free_table(&rctx->dst_tbl); in qce_ablkcipher_async_req_handle()
208 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_ablkcipher_crypt() local
212 rctx->flags = tmpl->alg_flags; in qce_ablkcipher_crypt()
213 rctx->flags |= encrypt ? QCE_ENCRYPT : QCE_DECRYPT; in qce_ablkcipher_crypt()
215 if (IS_AES(rctx->flags) && ctx->enc_keylen != AES_KEYSIZE_128 && in qce_ablkcipher_crypt()