瀏覽代碼

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>
Antoine Tenart 7 年之前
父節點
當前提交
4dc5475ae0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/crypto/inside-secure/safexcel_hash.c

+ 1 - 1
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;
 		}