diff options
author | Mathias Kresin <dev@kresin.me> | 2021-04-19 20:36:58 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-01-05 23:05:38 +0100 |
commit | 11d2c71538944ad55aca33d60d8bd442b8246ed6 (patch) | |
tree | bd29ecc4a1657b552d7a6a7325b71b70f720c8f8 /package/kernel/lantiq | |
parent | 87b6e10c71203d2dedd8a56dea91390dac00c525 (diff) | |
download | upstream-11d2c71538944ad55aca33d60d8bd442b8246ed6.tar.gz upstream-11d2c71538944ad55aca33d60d8bd442b8246ed6.tar.bz2 upstream-11d2c71538944ad55aca33d60d8bd442b8246ed6.zip |
ltq-deu: init des/aes before registering crpyto algorithms
The crypto algorithms are registered and available to the system before
the chip is actually powered on and the generic parameter for the DEU
behaviour set.
The issue can mainly be observed if the crypto manager tests are enabled
in the kernel config. The crypto manager test run directly after an
algorithm is registered.
Signed-off-by: Mathias Kresin <dev@kresin.me>
[fix commit title prefix]
Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
Diffstat (limited to 'package/kernel/lantiq')
-rw-r--r-- | package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c | 3 | ||||
-rw-r--r-- | package/kernel/lantiq/ltq-deu/src/ifxmips_des.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c index 76abfafb4e..7ce6df0ac6 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c @@ -894,6 +894,7 @@ int ifxdeu_init_aes (void) { int ret = -ENOSYS; + aes_chip_init(); if ((ret = crypto_register_alg(&ifxdeu_aes_alg))) goto aes_err; @@ -910,8 +911,6 @@ int ifxdeu_init_aes (void) if ((ret = crypto_register_alg(&ifxdeu_ctr_rfc3686_aes_alg))) goto ctr_rfc3686_aes_err; - aes_chip_init (); - CRTCL_SECT_INIT; diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c index 6d7d82fcb9..69a758c33c 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c @@ -690,6 +690,7 @@ int ifxdeu_init_des (void) { int ret = -ENOSYS; + des_chip_init(); ret = crypto_register_alg(&ifxdeu_des_alg); if (ret < 0) @@ -715,7 +716,6 @@ int ifxdeu_init_des (void) if (ret < 0) goto cbc_des3_ede_err; - des_chip_init(); CRTCL_SECT_INIT; |