linux-uconsole/drivers/crypto/caam
Fabio Estevam c013f7d1cd crypto: caam - fix i.MX6SX entropy delay value
commit 4ee4cdad36 upstream.

Since commit 358ba762d9 ("crypto: caam - enable prediction resistance
in HRWNG") the following CAAM errors can be seen on i.MX6SX:

caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG: Hardware error
hwrng: no data available

This error is due to an incorrect entropy delay for i.MX6SX.

Fix it by increasing the minimum entropy delay for i.MX6SX
as done in U-Boot:
https://patchwork.ozlabs.org/project/uboot/patch/20220415111049.2565744-1-gaurav.jain@nxp.com/

As explained in the U-Boot patch:

"RNG self tests are run to determine the correct entropy delay.
Such tests are executed with different voltages and temperatures to identify
the worst case value for the entropy delay. For i.MX6SX, it was determined
that after adding a margin value of 1000 the minimum entropy delay should be
at least 12000."

Cc: <stable@vger.kernel.org>
Fixes: 358ba762d9 ("crypto: caam - enable prediction resistance in HRWNG")
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-06 08:42:43 +02:00
..
caamalg.c crypto: caam - fix printing on xts fallback allocation error path 2020-12-30 11:53:03 +01:00
caamalg_desc.c crypto: caam/jr - add support for XTS with 16B IV 2020-10-02 18:02:12 +10:00
caamalg_desc.h
caamalg_qi.c crypto: caam - fix printing on xts fallback allocation error path 2020-12-30 11:53:03 +01:00
caamalg_qi2.c crypto: caam - replace this_cpu_ptr with raw_cpu_ptr 2022-01-27 10:54:24 +01:00
caamalg_qi2.h crypto: caam/qi2 - add fallback for XTS with more than 8B IV 2020-10-02 18:02:11 +10:00
caamhash.c crypto: drivers - set the flag CRYPTO_ALG_ALLOCATES_MEMORY 2020-07-16 21:49:10 +10:00
caamhash_desc.c
caamhash_desc.h
caampkc.c crypto: caam - disable pkc for non-E SoCs 2021-11-18 14:04:03 +01:00
caampkc.h
caamrng.c
compat.h crypto: caam - Remove broken arc4 support 2020-07-16 21:49:00 +10:00
ctrl.c crypto: caam - fix i.MX6SX entropy delay value 2022-06-06 08:42:43 +02:00
ctrl.h
debugfs.c crypto: caam - Move debugfs fops into standalone file 2020-08-21 14:47:49 +10:00
debugfs.h crypto: caam - Move debugfs fops into standalone file 2020-08-21 14:47:49 +10:00
desc.h crypto: caam - fix typos 2020-06-15 17:38:54 +10:00
desc_constr.h
dpseci-debugfs.c crypto: caam - Convert to DEFINE_SHOW_ATTRIBUTE 2020-09-25 17:48:16 +10:00
dpseci-debugfs.h
dpseci.c crypto: caam/qi2 - add support for dpseci_reset() 2020-06-18 17:19:45 +10:00
dpseci.h crypto: caam/qi2 - add support for dpseci_reset() 2020-06-18 17:19:45 +10:00
dpseci_cmd.h crypto: caam/qi2 - add support for dpseci_reset() 2020-06-18 17:19:45 +10:00
error.c crypto: caam - add more RNG hw error codes 2020-07-31 18:25:28 +10:00
error.h
intern.h crypto: caam - Move debugfs fops into standalone file 2020-08-21 14:47:49 +10:00
jr.c crypto: caam - Fix kerneldoc 2020-09-18 17:20:12 +10:00
jr.h
Kconfig crypto: caam/qi2 - add fallback for XTS with more than 8B IV 2020-10-02 18:02:11 +10:00
key_gen.c
key_gen.h
Makefile crypto: caam - Move debugfs fops into standalone file 2020-08-21 14:47:49 +10:00
pdb.h crypto: caam - fix typos 2020-06-15 17:38:54 +10:00
pkc_desc.c
qi.c crypto: caam - Move debugfs fops into standalone file 2020-08-21 14:47:49 +10:00
qi.h
regs.h crypto: caam - disable pkc for non-E SoCs 2021-11-18 14:04:03 +01:00
sg_sw_qm.h
sg_sw_qm2.h
sg_sw_sec4.h