summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/inside-secure
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2018-02-26 14:45:12 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2018-03-09 15:45:31 +0100
commit4dc5475ae0375ea4f9283dfd9b2ddc91b20d4c4b (patch)
tree9432ff6c6646208e24fa4b23c00cae4207b23f76 /drivers/crypto/inside-secure
parentcrypto: inside-secure - move cache result dma mapping to request (diff)
downloadlinux-4dc5475ae0375ea4f9283dfd9b2ddc91b20d4c4b.tar.xz
linux-4dc5475ae0375ea4f9283dfd9b2ddc91b20d4c4b.zip
crypto: inside-secure - wait for the request to complete if in the backlog
This patch updates the safexcel_hmac_init_pad() function to also wait for completion when the digest return code is -EBUSY, as it would mean the request is in the backlog to be processed later. Fixes: 1b44c5a60c13 ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver") Suggested-by: Ofer Heifetz <oferh@marvell.com> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/inside-secure')
-rw-r--r--drivers/crypto/inside-secure/safexcel_hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c
index 4953a2a86c10..77268c9f1620 100644
--- a/drivers/crypto/inside-secure/safexcel_hash.c
+++ b/drivers/crypto/inside-secure/safexcel_hash.c
@@ -842,7 +842,7 @@ static int safexcel_hmac_init_pad(struct ahash_request *areq,
init_completion(&result.completion);
ret = crypto_ahash_digest(areq);
- if (ret == -EINPROGRESS) {
+ if (ret == -EINPROGRESS || ret == -EBUSY) {
wait_for_completion_interruptible(&result.completion);
ret = result.error;
}