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>
This commit is contained in:
parent
87b6e10c71
commit
11d2c71538
2 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue