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);
31 unsigned int ileft = areq->cryptlen;
32 unsigned int oleft = areq->cryptlen;
40 if (!areq->cryptlen)
43 if (!areq->src || !areq->dst) {
48 if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) {
52 scatterwalk_map_and_copy(backup_iv, areq->src, areq->cryptlen - ivsize, ivsize, 0);
60 if (areq->iv) {
62 v = *(u32 *)(areq->iv + i * 4);
69 ileft = areq->cryptlen / 4;
70 oleft = areq->cryptlen / 4;
75 sg_miter_start(&mi, areq->src, sg_nents(areq->src),
103 sg_miter_start(&mo, areq->dst, sg_nents(areq->dst),
127 if (areq->iv) {
129 memcpy(areq->iv, backup_iv, ivsize);
132 scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize,
144 static int noinline_for_stack sun4i_ss_cipher_poll_fallback(struct skcipher_request *areq)
146 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
148 struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq);
152 skcipher_request_set_callback(&ctx->fallback_req, areq->base.flags,
153 areq->base.complete, areq->base.data);
154 skcipher_request_set_crypt(&ctx->fallback_req, areq->src, areq->dst,
155 areq->cryptlen, areq->iv);
165 static int sun4i_ss_cipher_poll(struct skcipher_request *areq)
167 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
171 struct scatterlist *in_sg = areq->src;
172 struct scatterlist *out_sg = areq->dst;
174 struct sun4i_cipher_req_ctx *ctx = skcipher_request_ctx(areq);
185 unsigned int ileft = areq->cryptlen;
186 unsigned int oleft = areq->cryptlen;
199 if (!areq->cryptlen)
202 if (!areq->src || !areq->dst) {
208 if (areq->cryptlen % algt->alg.crypto.base.cra_blocksize)
227 return sun4i_ss_opti_poll(areq);
230 return sun4i_ss_cipher_poll_fallback(areq);
232 if (areq->iv && ivsize > 0 && mode & SS_DECRYPTION) {
236 scatterwalk_map_and_copy(backup_iv, areq->src, areq->cryptlen - ivsize, ivsize, 0);
244 if (areq->iv) {
246 v = *(u32 *)(areq->iv + i * 4);
252 ileft = areq->cryptlen;
253 oleft = areq->cryptlen;
259 sg_miter_start(&mi, areq->src, sg_nents(areq->src),
313 sg_miter_start(&mo, areq->dst, sg_nents(areq->dst),
366 if (areq->iv) {
368 memcpy(areq->iv, backup_iv, ivsize);
371 scatterwalk_map_and_copy(areq->iv, areq->dst, areq->cryptlen - ivsize,
384 int sun4i_ss_cbc_aes_encrypt(struct skcipher_request *areq)
386 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
388 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
392 return sun4i_ss_cipher_poll(areq);
395 int sun4i_ss_cbc_aes_decrypt(struct skcipher_request *areq)
397 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
399 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
403 return sun4i_ss_cipher_poll(areq);
407 int sun4i_ss_ecb_aes_encrypt(struct skcipher_request *areq)
409 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
411 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
415 return sun4i_ss_cipher_poll(areq);
418 int sun4i_ss_ecb_aes_decrypt(struct skcipher_request *areq)
420 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
422 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
426 return sun4i_ss_cipher_poll(areq);
430 int sun4i_ss_cbc_des_encrypt(struct skcipher_request *areq)
432 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
434 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
438 return sun4i_ss_cipher_poll(areq);
441 int sun4i_ss_cbc_des_decrypt(struct skcipher_request *areq)
443 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
445 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
449 return sun4i_ss_cipher_poll(areq);
453 int sun4i_ss_ecb_des_encrypt(struct skcipher_request *areq)
455 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
457 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
461 return sun4i_ss_cipher_poll(areq);
464 int sun4i_ss_ecb_des_decrypt(struct skcipher_request *areq)
466 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
468 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
472 return sun4i_ss_cipher_poll(areq);
476 int sun4i_ss_cbc_des3_encrypt(struct skcipher_request *areq)
478 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
480 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
484 return sun4i_ss_cipher_poll(areq);
487 int sun4i_ss_cbc_des3_decrypt(struct skcipher_request *areq)
489 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
491 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
495 return sun4i_ss_cipher_poll(areq);
499 int sun4i_ss_ecb_des3_encrypt(struct skcipher_request *areq)
501 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
503 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
507 return sun4i_ss_cipher_poll(areq);
510 int sun4i_ss_ecb_des3_decrypt(struct skcipher_request *areq)
512 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq);
514 struct sun4i_cipher_req_ctx *rctx = skcipher_request_ctx(areq);
518 return sun4i_ss_cipher_poll(areq);