Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Fabio Estevam and committed by
Herbert Xu
d42cf2f1 bceab44e

+2
+2
drivers/crypto/sahara.c
··· 1259 1259 .export = sahara_sha_export, 1260 1260 .import = sahara_sha_import, 1261 1261 .halg.digestsize = SHA1_DIGEST_SIZE, 1262 + .halg.statesize = sizeof(struct sahara_sha_reqctx), 1262 1263 .halg.base = { 1263 1264 .cra_name = "sha1", 1264 1265 .cra_driver_name = "sahara-sha1", ··· 1287 1286 .export = sahara_sha_export, 1288 1287 .import = sahara_sha_import, 1289 1288 .halg.digestsize = SHA256_DIGEST_SIZE, 1289 + .halg.statesize = sizeof(struct sahara_sha_reqctx), 1290 1290 .halg.base = { 1291 1291 .cra_name = "sha256", 1292 1292 .cra_driver_name = "sahara-sha256",