Lines Matching defs:areq

15 static int noinline_for_stack sun4i_ss_opti_poll(struct skcipher_request *areq)
17 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
21 struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq);
30 unsigned int ileft = areq->cryptlen;
31 unsigned int oleft = areq->cryptlen;
41 if (!areq->cryptlen)
44 if (!areq->src || !areq->dst) {
49 if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) {
50 scatterwalk_map_and_copy(ctx->backup_iv, areq->src,
51 areq->cryptlen - ivsize, ivsize, 0);
57 algt->stat_bytes += areq->cryptlen;
65 if (areq->iv) {
67 v = *(u32 *)(areq->iv + i * 4);
74 ileft = areq->cryptlen / 4;
75 oleft = areq->cryptlen / 4;
80 sg_miter_start(&mi, areq->src, sg_nents(areq->src),
108 sg_miter_start(&mo, areq->dst, sg_nents(areq->dst),
132 if (areq->iv) {
134 memcpy(areq->iv, ctx->backup_iv, ivsize);
137 scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize,
148 static int noinline_for_stack sun4i_ss_cipher_poll_fallback(struct skcipher_request *areq)
150 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
152 struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq);
163 skcipher_request_set_callback(&ctx->fallback_req, areq->base.flags,
164 areq->base.complete, areq->base.data);
165 skcipher_request_set_crypt(&ctx->fallback_req, areq->src, areq->dst,
166 areq->cryptlen, areq->iv);
176 static int sun4i_ss_cipher_poll(struct skcipher_request *areq)
178 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
182 struct scatterlist *in_sg = areq->src;
183 struct scatterlist *out_sg = areq->dst;
185 struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq);
196 unsigned int ileft = areq->cryptlen;
197 unsigned int oleft = areq->cryptlen;
209 if (!areq->cryptlen)
212 if (!areq->src || !areq->dst) {
218 if (areq->cryptlen % algt->alg.crypto.base.cra_blocksize)
237 return sun4i_ss_opti_poll(areq);
240 return sun4i_ss_cipher_poll_fallback(areq);
242 if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) {
243 scatterwalk_map_and_copy(ctx->backup_iv, areq->src,
244 areq->cryptlen - ivsize, ivsize, 0);
249 algt->stat_bytes += areq->cryptlen;
257 if (areq->iv) {
259 v = *(u32 *)(areq->iv + i * 4);
265 ileft = areq->cryptlen;
266 oleft = areq->cryptlen;
272 sg_miter_start(&mi, areq->src, sg_nents(areq->src),
326 sg_miter_start(&mo, areq->dst, sg_nents(areq->dst),
379 if (areq->iv) {
381 memcpy(areq->iv, ctx->backup_iv, ivsize);
384 scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize,
397 int sun4i_ss_cbc_aes_encrypt(struct skcipher_request *areq)
399 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
401 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
405 return sun4i_ss_cipher_poll(areq);
408 int sun4i_ss_cbc_aes_decrypt(struct skcipher_request *areq)
410 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
412 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
416 return sun4i_ss_cipher_poll(areq);
420 int sun4i_ss_ecb_aes_encrypt(struct skcipher_request *areq)
422 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
424 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
428 return sun4i_ss_cipher_poll(areq);
431 int sun4i_ss_ecb_aes_decrypt(struct skcipher_request *areq)
433 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
435 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
439 return sun4i_ss_cipher_poll(areq);
443 int sun4i_ss_cbc_des_encrypt(struct skcipher_request *areq)
445 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
447 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
451 return sun4i_ss_cipher_poll(areq);
454 int sun4i_ss_cbc_des_decrypt(struct skcipher_request *areq)
456 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
458 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
462 return sun4i_ss_cipher_poll(areq);
466 int sun4i_ss_ecb_des_encrypt(struct skcipher_request *areq)
468 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
470 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
474 return sun4i_ss_cipher_poll(areq);
477 int sun4i_ss_ecb_des_decrypt(struct skcipher_request *areq)
479 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
481 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
485 return sun4i_ss_cipher_poll(areq);
489 int sun4i_ss_cbc_des3_encrypt(struct skcipher_request *areq)
491 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
493 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
497 return sun4i_ss_cipher_poll(areq);
500 int sun4i_ss_cbc_des3_decrypt(struct skcipher_request *areq)
502 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
504 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
508 return sun4i_ss_cipher_poll(areq);
512 int sun4i_ss_ecb_des3_encrypt(struct skcipher_request *areq)
514 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
516 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
520 return sun4i_ss_cipher_poll(areq);
523 int sun4i_ss_ecb_des3_decrypt(struct skcipher_request *areq)
525 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
527 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
531 return sun4i_ss_cipher_poll(areq);