Lines Matching refs:req

28 	struct ablkcipher_request *req = ablkcipher_request_cast(async_req);  in qce_ablkcipher_done()  local
29 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_ablkcipher_done()
37 diff_dst = (req->src != req->dst) ? true : false; in qce_ablkcipher_done()
64 struct ablkcipher_request *req = ablkcipher_request_cast(async_req); in qce_ablkcipher_async_req_handle() local
65 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_ablkcipher_async_req_handle()
66 struct crypto_ablkcipher *ablkcipher = crypto_ablkcipher_reqtfm(req); in qce_ablkcipher_async_req_handle()
75 rctx->iv = req->info; in qce_ablkcipher_async_req_handle()
77 rctx->cryptlen = req->nbytes; in qce_ablkcipher_async_req_handle()
79 diff_dst = (req->src != req->dst) ? true : false; in qce_ablkcipher_async_req_handle()
83 rctx->src_nents = qce_countsg(req->src, req->nbytes, in qce_ablkcipher_async_req_handle()
86 rctx->dst_nents = qce_countsg(req->dst, req->nbytes, in qce_ablkcipher_async_req_handle()
95 gfp = (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ? in qce_ablkcipher_async_req_handle()
104 sg = qce_sgtable_add(&rctx->dst_tbl, req->dst); 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()
129 rctx->src_sg = req->src; in qce_ablkcipher_async_req_handle()
142 ret = qce_start(async_req, tmpl->crypto_alg_type, req->nbytes, 0); in qce_ablkcipher_async_req_handle()
152 qce_unmapsg(qce->dev, req->src, rctx->src_nents, dir_src, in qce_ablkcipher_async_req_handle()
203 static int qce_ablkcipher_crypt(struct ablkcipher_request *req, int encrypt) in qce_ablkcipher_crypt() argument
206 crypto_ablkcipher_tfm(crypto_ablkcipher_reqtfm(req)); in qce_ablkcipher_crypt()
208 struct qce_cipher_reqctx *rctx = ablkcipher_request_ctx(req); in qce_ablkcipher_crypt()
217 ablkcipher_request_set_tfm(req, ctx->fallback); in qce_ablkcipher_crypt()
218 ret = encrypt ? crypto_ablkcipher_encrypt(req) : in qce_ablkcipher_crypt()
219 crypto_ablkcipher_decrypt(req); in qce_ablkcipher_crypt()
220 ablkcipher_request_set_tfm(req, __crypto_ablkcipher_cast(tfm)); in qce_ablkcipher_crypt()
224 return tmpl->qce->async_req_enqueue(tmpl->qce, &req->base); in qce_ablkcipher_crypt()
227 static int qce_ablkcipher_encrypt(struct ablkcipher_request *req) in qce_ablkcipher_encrypt() argument
229 return qce_ablkcipher_crypt(req, 1); in qce_ablkcipher_encrypt()
232 static int qce_ablkcipher_decrypt(struct ablkcipher_request *req) in qce_ablkcipher_decrypt() argument
234 return qce_ablkcipher_crypt(req, 0); in qce_ablkcipher_decrypt()