Just saw Lucas Stach's post "CAAM RNG trouble" from yesterday which
seems to be describing this same issue - added to CC.
On Tue, 2020-12-15 at 17:31 -0600, Robert Hancock wrote:
> Hello,
>
> We have an iMX6D-based board which was previously using 5.4.x
> kernels.
> I have recently started testing v5.10.1 on this board and am running
> into an issue with the CAAM RNG. The dmesg is getting output like
> this
> and all reads from /dev/hwrng are failing with EINVAL:
>
> [ 17.368368] caam_jr 2101000.jr: 2000025b: CCB: desc idx 2: RNG:
> Hardware error
> [ 17.375721] hwrng: no data available
> [ 23.200255] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
> Hardware error
> [ 23.215508] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
> Hardware error
> [ 23.229249] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
> Hardware error
> [ 23.243415] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
> Hardware error
> [ 23.257809] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
> Hardware error
> [ 23.272109] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
> Hardware error
>
> We are not using secure boot presently, if that matters. On 5.4, no
> such issues and /dev/hwrng seems to work fine.
>
> I see there are some CAAM RNG changes between 5.4 and 5.10 but not
> sure
> which might be the cause?
>
> The CAAM initialization output on boot (same on working 5.4 and non-
> working 5.10.1 kernels):
>
> [ 16.934253] caam 2100000.crypto: Entropy delay = 3200
> [ 17.000146] caam 2100000.crypto: Instantiated RNG4 SH0
> [ 17.060911] caam 2100000.crypto: Instantiated RNG4 SH1
> [ 17.067891] caam 2100000.crypto: device ID = 0x0a16010000000000
> (Era
> 4)
> [ 17.080289] caam 2100000.crypto: job rings = 2, qi = 0
> [ 17.113498] caam algorithms registered in /proc/crypto
> [ 17.120099] caam 2100000.crypto: registering rng-caam
>