From: Fabio Estevam <festevam@gmail.com>
To: herbert@gondor.apana.org.au
Cc: s.trumtrar@pengutronix.de, linux-crypto@vger.kernel.org,
Fabio Estevam <fabio.estevam@nxp.com>
Subject: [PATCH] crypto: sahara: Fill the statesize field
Date: Wed, 13 Jan 2016 10:10:05 -0200 [thread overview]
Message-ID: <1452687005-16444-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@nxp.com>
Currently the sahara driver fails to probe:
sahara: probe of 63ff8000.crypto failed with error -22
This happens since commit 8996eafdcbad ("crypto: ahash - ensure statesize
is non-zero"), which requires statesize to be filled.
Pass the statesize members for sha1 and sha256, so we can probe
the driver successfully again.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Hi Steffen,
Only 'probe' tested. Haven't run any crypto operations yet.
drivers/crypto/sahara.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index f68c24a..d05d849 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -1260,6 +1260,7 @@ static struct ahash_alg sha_v3_algs[] = {
.export = sahara_sha_export,
.import = sahara_sha_import,
.halg.digestsize = SHA1_DIGEST_SIZE,
+ .halg.statesize = sizeof(struct sahara_ctx),
.halg.base = {
.cra_name = "sha1",
.cra_driver_name = "sahara-sha1",
@@ -1287,6 +1288,7 @@ static struct ahash_alg sha_v4_algs[] = {
.export = sahara_sha_export,
.import = sahara_sha_import,
.halg.digestsize = SHA256_DIGEST_SIZE,
+ .halg.statesize = sizeof(struct sahara_ctx),
.halg.base = {
.cra_name = "sha256",
.cra_driver_name = "sahara-sha256",
--
1.9.1
next reply other threads:[~2016-01-13 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 12:10 Fabio Estevam [this message]
2016-01-13 16:42 ` [PATCH] crypto: sahara: Fill the statesize field Fabio Estevam
2016-01-13 17:00 ` Tom Lendacky
2016-01-13 17:24 ` Fabio Estevam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452687005-16444-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=fabio.estevam@nxp.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=s.trumtrar@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.