Commit d42cf2f1 authored by Fabio Estevam's avatar Fabio Estevam Committed by Herbert Xu

crypto: sahara - fill the statesize field

Currently the sahara driver fails to probe:

sahara: probe of 63ff8000.crypto failed with error -22

This happens since commit 8996eafd ("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: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent bceab44e
...@@ -1259,6 +1259,7 @@ static struct ahash_alg sha_v3_algs[] = { ...@@ -1259,6 +1259,7 @@ static struct ahash_alg sha_v3_algs[] = {
.export = sahara_sha_export, .export = sahara_sha_export,
.import = sahara_sha_import, .import = sahara_sha_import,
.halg.digestsize = SHA1_DIGEST_SIZE, .halg.digestsize = SHA1_DIGEST_SIZE,
.halg.statesize = sizeof(struct sahara_sha_reqctx),
.halg.base = { .halg.base = {
.cra_name = "sha1", .cra_name = "sha1",
.cra_driver_name = "sahara-sha1", .cra_driver_name = "sahara-sha1",
...@@ -1286,6 +1287,7 @@ static struct ahash_alg sha_v4_algs[] = { ...@@ -1286,6 +1287,7 @@ static struct ahash_alg sha_v4_algs[] = {
.export = sahara_sha_export, .export = sahara_sha_export,
.import = sahara_sha_import, .import = sahara_sha_import,
.halg.digestsize = SHA256_DIGEST_SIZE, .halg.digestsize = SHA256_DIGEST_SIZE,
.halg.statesize = sizeof(struct sahara_sha_reqctx),
.halg.base = { .halg.base = {
.cra_name = "sha256", .cra_name = "sha256",
.cra_driver_name = "sahara-sha256", .cra_driver_name = "sahara-sha256",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment