linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: Fredrik Yhlen <fredrik.yhlen@endian.se>,
	Horia Geanta Neag <horia.geanta@nxp.com>
Cc: Aymen Sghaier <aymen.sghaier@nxp.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	"open list:HARDWARE RANDOM NUMBER GENERATOR CORE" 
	<linux-crypto@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Andrey Smirnov <andrew.smirnov@gmail.com>,
	Heiko Schocher <hs@denx.de>
Subject: Re: HRNG in CAAM isn't working properly on IMX6 SoloX
Date: Mon, 10 Jan 2022 13:28:54 -0300	[thread overview]
Message-ID: <CAOMZO5BkFf1HYbe86nGjnx=w6Lj16fP2u=t233aBv85LAokdmA@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5D0m1xCfgFifKz1H+oYQSfxsfuZp4U39rPMACmzv1fvjQ@mail.gmail.com>

Hi Horia,

On Mon, Aug 30, 2021 at 8:49 AM Fabio Estevam <festevam@gmail.com> wrote:

> We also observe this issue.
>
> Heiko on Cc tried increasing the RTSDCTL_ENT_DLY_MIN value
> and this seems to help:
>
> diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h
> index af61f3a2c0d4..53c9fa04a24c 100644
> --- a/drivers/crypto/caam/regs.h
> +++ b/drivers/crypto/caam/regs.h
> @@ -513,7 +513,7 @@ struct rng4tst {
>   };
>  #define RTSDCTL_ENT_DLY_SHIFT 16
>  #define RTSDCTL_ENT_DLY_MASK (0xffff << RTSDCTL_ENT_DLY_SHIFT)
> -#define RTSDCTL_ENT_DLY_MIN 3200
> +#define RTSDCTL_ENT_DLY_MIN 4800
>  #define RTSDCTL_ENT_DLY_MAX 12800
>   u32 rtsdctl; /* seed control register */
>   union {

Even with the change above we get the following errors on a
imx6sx-based board running 5.10.y:

[    0.918126] caam 2100000.crypto: registering rng-caam
[   22.598192] caam_jr 2101000.jr: 2000025b: CCB: desc idx 2: RNG:
Hardware error
[   22.598260] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
Hardware error
[   22.598324] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
Hardware error
[   22.598368] caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG:
Hardware error

What is the proper way to fix this issue?

Thanks,

Fabio Estevam

      parent reply	other threads:[~2022-01-10 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30 11:21 HRNG in CAAM isn't working properly on IMX6 SoloX Fredrik Yhlen
2021-08-30 11:49 ` Fabio Estevam
2021-08-30 16:28   ` Fredrik Yhlen
2021-08-30 17:57     ` Fredrik Yhlen
2022-01-10 16:28   ` Fabio Estevam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOMZO5BkFf1HYbe86nGjnx=w6Lj16fP2u=t233aBv85LAokdmA@mail.gmail.com' \
    --to=festevam@gmail.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=aymen.sghaier@nxp.com \
    --cc=davem@davemloft.net \
    --cc=fredrik.yhlen@endian.se \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=hs@denx.de \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).