diff mbox

[1/4] crypto: omap-sham - fix concurrent sha1 calculations

Message ID f99ac830803c8c7877ceed3b89593e2461836b56.1303295558.git.dmitry.kasatkin@nokia.com (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

Dmitry Kasatkin April 20, 2011, 10:34 a.m. UTC
From: Markku Kylanpaa <ext-markku.kylanpaa@nokia.com>

SHA1 accelerator can also be busy. Add -EBUSY status return option and
return busy status from omap_sham_finup().

Signed-off-by: Markku Kylanpaa <ext-markku.kylanpaa@nokia.com>
---
 drivers/crypto/omap-sham.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 465cde3..e36032b 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -835,7 +835,7 @@  static int omap_sham_finup(struct ahash_request *req)
 	ctx->flags |= FLAGS_FINUP;
 
 	err1 = omap_sham_update(req);
-	if (err1 == -EINPROGRESS)
+	if (err1 == -EINPROGRESS || err1 == -EBUSY)
 		return err1;
 	/*
 	 * final() has to be always called to cleanup resources