Lines Matching refs:req

134 	struct ahash_request	*req;
167 struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
213 struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
226 struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
256 struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
258 ctx->bufcnt = sg_copy_to_buffer(hdev->req->src, sg_nents(ctx->sg),
259 ctx->buffer, hdev->req->nbytes);
261 ctx->total = hdev->req->nbytes;
271 static int img_hash_finish(struct ahash_request *req)
273 struct img_hash_request_ctx *ctx = ahash_request_ctx(req);
275 if (!req->result)
278 memcpy(req->result, ctx->digest, ctx->digsize);
283 static void img_hash_copy_hash(struct ahash_request *req)
285 struct img_hash_request_ctx *ctx = ahash_request_ctx(req);
293 static void img_hash_finish_req(struct ahash_request *req, int err)
295 struct img_hash_request_ctx *ctx = ahash_request_ctx(req);
299 img_hash_copy_hash(req);
301 err = img_hash_finish(req);
310 if (req->base.complete)
311 ahash_request_complete(req, err);
316 struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
366 if (!hdev->req)
369 ctx = ahash_request_ctx(hdev->req);
436 struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
446 struct ahash_request *req = hdev->req;
447 struct img_hash_request_ctx *ctx = ahash_request_ctx(req);
452 if (req->nbytes >= IMG_HASH_DMA_THRESHOLD) {
454 req->nbytes);
458 req->nbytes);
473 nbits = (u64)hdev->req->nbytes << 3;
487 static int img_hash_init(struct ahash_request *req)
489 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
490 struct img_hash_request_ctx *rctx = ahash_request_ctx(req);
494 rctx->fallback_req.base.flags = req->base.flags
501 struct ahash_request *req)
510 if (req)
511 res = ahash_enqueue_request(&hdev->queue, req);
531 req = ahash_request_cast(async_req);
532 hdev->req = req;
534 ctx = ahash_request_ctx(req);
536 dev_info(hdev->dev, "processing req, op: %lu, bytes: %d\n",
537 ctx->op, req->nbytes);
546 img_hash_finish_req(req, err);
551 static int img_hash_update(struct ahash_request *req)
553 struct img_hash_request_ctx *rctx = ahash_request_ctx(req);
554 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
558 rctx->fallback_req.base.flags = req->base.flags
560 rctx->fallback_req.nbytes = req->nbytes;
561 rctx->fallback_req.src = req->src;
566 static int img_hash_final(struct ahash_request *req)
568 struct img_hash_request_ctx *rctx = ahash_request_ctx(req);
569 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
573 rctx->fallback_req.base.flags = req->base.flags
575 rctx->fallback_req.result = req->result;
580 static int img_hash_finup(struct ahash_request *req)
582 struct img_hash_request_ctx *rctx = ahash_request_ctx(req);
583 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
587 rctx->fallback_req.base.flags = req->base.flags
589 rctx->fallback_req.nbytes = req->nbytes;
590 rctx->fallback_req.src = req->src;
591 rctx->fallback_req.result = req->result;
596 static int img_hash_import(struct ahash_request *req, const void *in)
598 struct img_hash_request_ctx *rctx = ahash_request_ctx(req);
599 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
603 rctx->fallback_req.base.flags = req->base.flags
609 static int img_hash_export(struct ahash_request *req, void *out)
611 struct img_hash_request_ctx *rctx = ahash_request_ctx(req);
612 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
616 rctx->fallback_req.base.flags = req->base.flags
622 static int img_hash_digest(struct ahash_request *req)
624 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
626 struct img_hash_request_ctx *ctx = ahash_request_ctx(req);
668 ctx->total = req->nbytes;
669 ctx->sg = req->src;
670 ctx->sgfirst = req->src;
673 err = img_hash_handle_queue(tctx->hdev, req);
927 img_hash_finish_req(hdev->req, err);