linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* imx27: Unsupported ECC algorithm
@ 2020-09-16 13:49 Fabio Estevam
  2020-09-17 16:13 ` Miquel Raynal
  2020-09-21  9:40 ` Sascha Hauer
  0 siblings, 2 replies; 19+ messages in thread
From: Fabio Estevam @ 2020-09-16 13:49 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: linux-mtd, Sascha Hauer

Hi Miquel,

On a imx27-phytec-phycard-s-rdk  board running linux-next, the
following warning is seen:

10:15:26.232069  ------------[ cut here ]------------
10:15:26.232880  WARNING: CPU: 0 PID: 1 at
drivers/mtd/nand/raw/nand_base.c:5242 nand_scan_with_ids+0x9bc/0x1008
10:15:26.241132  Unsupported ECC algorithm!

I believe it has been caused by 74a89d7f9ed7 ("mtd: rawnand: Use the
ECC framework user input parsing bits")

Its dts uses nand-ecc-mode = "hw" :

&nfc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_nfc>;
nand-bus-width = <8>;
nand-ecc-mode = "hw";
nand-on-flash-bbt;
status = "okay";
};

I don't have access to this hardware, but I saw the report by the
Pengutronix lab in kernelci:
https://storage.kernelci.org/next/master/next-20200916/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html

Any ideas?

Thanks,

Fabio Estevam

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-09-16 13:49 imx27: Unsupported ECC algorithm Fabio Estevam
@ 2020-09-17 16:13 ` Miquel Raynal
  2020-09-17 16:45   ` Miquel Raynal
  2020-09-21  9:40 ` Sascha Hauer
  1 sibling, 1 reply; 19+ messages in thread
From: Miquel Raynal @ 2020-09-17 16:13 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-mtd, Sascha Hauer

Hi Fabio,

Fabio Estevam <festevam@gmail.com> wrote on Wed, 16 Sep 2020 10:49:03
-0300:

> Hi Miquel,
> 
> On a imx27-phytec-phycard-s-rdk  board running linux-next, the
> following warning is seen:
> 
> 10:15:26.232069  ------------[ cut here ]------------
> 10:15:26.232880  WARNING: CPU: 0 PID: 1 at
> drivers/mtd/nand/raw/nand_base.c:5242 nand_scan_with_ids+0x9bc/0x1008
> 10:15:26.241132  Unsupported ECC algorithm!
> 
> I believe it has been caused by 74a89d7f9ed7 ("mtd: rawnand: Use the
> ECC framework user input parsing bits")
> 
> Its dts uses nand-ecc-mode = "hw" :
> 
> &nfc {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_nfc>;
> nand-bus-width = <8>;
> nand-ecc-mode = "hw";
> nand-on-flash-bbt;
> status = "okay";
> };
> 
> I don't have access to this hardware, but I saw the report by the
> Pengutronix lab in kernelci:
> https://storage.kernelci.org/next/master/next-20200916/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html
> 
> Any ideas?

Thanks for the report, I don't know what is happening yet but I'll
investigate.

As I'll be off next week, it might take a bit longer than expected
to see this solved if I don't come up with something by tomorrow...

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-09-17 16:13 ` Miquel Raynal
@ 2020-09-17 16:45   ` Miquel Raynal
  2020-09-17 17:12     ` Fabio Estevam
  0 siblings, 1 reply; 19+ messages in thread
From: Miquel Raynal @ 2020-09-17 16:45 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-mtd, Sascha Hauer

Hi Fabio,

Miquel Raynal <miquel.raynal@bootlin.com> wrote on Thu, 17 Sep 2020
18:13:18 +0200:

> Hi Fabio,
> 
> Fabio Estevam <festevam@gmail.com> wrote on Wed, 16 Sep 2020 10:49:03
> -0300:
> 
> > Hi Miquel,
> > 
> > On a imx27-phytec-phycard-s-rdk  board running linux-next, the
> > following warning is seen:
> > 
> > 10:15:26.232069  ------------[ cut here ]------------
> > 10:15:26.232880  WARNING: CPU: 0 PID: 1 at
> > drivers/mtd/nand/raw/nand_base.c:5242 nand_scan_with_ids+0x9bc/0x1008
> > 10:15:26.241132  Unsupported ECC algorithm!
> > 
> > I believe it has been caused by 74a89d7f9ed7 ("mtd: rawnand: Use the
> > ECC framework user input parsing bits")
> > 
> > Its dts uses nand-ecc-mode = "hw" :
> > 
> > &nfc {
> > pinctrl-names = "default";
> > pinctrl-0 = <&pinctrl_nfc>;
> > nand-bus-width = <8>;
> > nand-ecc-mode = "hw";
> > nand-on-flash-bbt;
> > status = "okay";
> > };
> > 
> > I don't have access to this hardware, but I saw the report by the
> > Pengutronix lab in kernelci:
> > https://storage.kernelci.org/next/master/next-20200916/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html
> > 
> > Any ideas?  
> 
> Thanks for the report, I don't know what is happening yet but I'll
> investigate.
> 
> As I'll be off next week, it might take a bit longer than expected
> to see this solved if I don't come up with something by tomorrow...

Perhaps Tudor's series is related to your issue, would you mind testing
it?

https://patchwork.ozlabs.org/project/linux-mtd/list/?series=202344

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-09-17 16:45   ` Miquel Raynal
@ 2020-09-17 17:12     ` Fabio Estevam
  0 siblings, 0 replies; 19+ messages in thread
From: Fabio Estevam @ 2020-09-17 17:12 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: linux-mtd, Sascha Hauer

Hi Miquel,

On Thu, Sep 17, 2020 at 1:45 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote:

> Perhaps Tudor's series is related to your issue, would you mind testing
> it?
>
> https://patchwork.ozlabs.org/project/linux-mtd/list/?series=202344

I don't have access to the imx27 hardware, just noticed the problem in
kernelci, but I can't test it myself.

Thanks

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-09-16 13:49 imx27: Unsupported ECC algorithm Fabio Estevam
  2020-09-17 16:13 ` Miquel Raynal
@ 2020-09-21  9:40 ` Sascha Hauer
  2020-09-28 15:20   ` Miquel Raynal
  1 sibling, 1 reply; 19+ messages in thread
From: Sascha Hauer @ 2020-09-21  9:40 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-mtd, Sascha Hauer, Miquel Raynal

Hi Fabio,

On Wed, Sep 16, 2020 at 10:49:03AM -0300, Fabio Estevam wrote:
> Hi Miquel,
> 
> On a imx27-phytec-phycard-s-rdk  board running linux-next, the
> following warning is seen:
> 
> 10:15:26.232069  ------------[ cut here ]------------
> 10:15:26.232880  WARNING: CPU: 0 PID: 1 at
> drivers/mtd/nand/raw/nand_base.c:5242 nand_scan_with_ids+0x9bc/0x1008
> 10:15:26.241132  Unsupported ECC algorithm!

Thanks for spotting this.

> 
> I believe it has been caused by 74a89d7f9ed7 ("mtd: rawnand: Use the
> ECC framework user input parsing bits")

I believe that as well. I've send a response to the original patch mail
describing what goes wrong here.

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-09-21  9:40 ` Sascha Hauer
@ 2020-09-28 15:20   ` Miquel Raynal
  2020-09-29 11:39     ` Fabio Estevam
  0 siblings, 1 reply; 19+ messages in thread
From: Miquel Raynal @ 2020-09-28 15:20 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: linux-mtd, Fabio Estevam, Sascha Hauer

Hi Fabio,

Sascha Hauer <s.hauer@pengutronix.de> wrote on Mon, 21 Sep 2020
11:40:10 +0200:

> Hi Fabio,
> 
> On Wed, Sep 16, 2020 at 10:49:03AM -0300, Fabio Estevam wrote:
> > Hi Miquel,
> > 
> > On a imx27-phytec-phycard-s-rdk  board running linux-next, the
> > following warning is seen:
> > 
> > 10:15:26.232069  ------------[ cut here ]------------
> > 10:15:26.232880  WARNING: CPU: 0 PID: 1 at
> > drivers/mtd/nand/raw/nand_base.c:5242 nand_scan_with_ids+0x9bc/0x1008
> > 10:15:26.241132  Unsupported ECC algorithm!  
> 
> Thanks for spotting this.
> 
> > 
> > I believe it has been caused by 74a89d7f9ed7 ("mtd: rawnand: Use the
> > ECC framework user input parsing bits")  
> 
> I believe that as well. I've send a response to the original patch mail
> describing what goes wrong here.
> 
> Sascha
> 
> 

The issue is now addressed thanks to Sascha findings, it is fixed in
nand/next and should be in today's linux-next as well. Please tell me
if the CI still reports an error!

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-09-28 15:20   ` Miquel Raynal
@ 2020-09-29 11:39     ` Fabio Estevam
  2020-09-29 16:31       ` Fabio Estevam
  0 siblings, 1 reply; 19+ messages in thread
From: Fabio Estevam @ 2020-09-29 11:39 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: Sascha Hauer, linux-mtd, Sascha Hauer

Hi Miquel,

On Mon, Sep 28, 2020 at 12:20 PM Miquel Raynal
<miquel.raynal@bootlin.com> wrote:

> The issue is now addressed thanks to Sascha findings, it is fixed in
> nand/next and should be in today's linux-next as well. Please tell me
> if the CI still reports an error!

linux-next from 20200928 still reports the same error:

https://storage.kernelci.org/next/master/next-20200928/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html

I checked that the fix pointed out by Sascha is not present in this tree though.

I do see it fixed in linux-next from today (20200929), but the report
from 20200929 is not yet available.

I will let you know after kernelci publishes the boot results from today's next.

Thanks,

Fabio Estevam

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-09-29 11:39     ` Fabio Estevam
@ 2020-09-29 16:31       ` Fabio Estevam
  2020-09-29 17:46         ` Miquel Raynal
  2020-09-30 14:58         ` Miquel Raynal
  0 siblings, 2 replies; 19+ messages in thread
From: Fabio Estevam @ 2020-09-29 16:31 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: Sascha Hauer, linux-mtd, Sascha Hauer

Hi Miquel,

On Tue, Sep 29, 2020 at 8:39 AM Fabio Estevam <festevam@gmail.com> wrote:

> linux-next from 20200928 still reports the same error:
>
> https://storage.kernelci.org/next/master/next-20200928/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html
>
> I checked that the fix pointed out by Sascha is not present in this tree though.
>
> I do see it fixed in linux-next from today (20200929), but the report
> from 20200929 is not yet available.
>
> I will let you know after kernelci publishes the boot results from today's next.

linux-next 20200929 has an even worse log with a new division by zero:

https://storage.kernelci.org/next/master/next-20200929/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-09-29 16:31       ` Fabio Estevam
@ 2020-09-29 17:46         ` Miquel Raynal
  2020-09-30 14:58         ` Miquel Raynal
  1 sibling, 0 replies; 19+ messages in thread
From: Miquel Raynal @ 2020-09-29 17:46 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Sascha Hauer, linux-mtd, Sascha Hauer

Hi Fabio,

Fabio Estevam <festevam@gmail.com> wrote on Tue, 29 Sep 2020 13:31:03
-0300:

> Hi Miquel,
> 
> On Tue, Sep 29, 2020 at 8:39 AM Fabio Estevam <festevam@gmail.com> wrote:
> 
> > linux-next from 20200928 still reports the same error:
> >
> > https://storage.kernelci.org/next/master/next-20200928/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html
> >
> > I checked that the fix pointed out by Sascha is not present in this tree though.
> >
> > I do see it fixed in linux-next from today (20200929), but the report
> > from 20200929 is not yet available.
> >
> > I will let you know after kernelci publishes the boot results from today's next.  
> 
> linux-next 20200929 has an even worse log with a new division by zero:
> 
> https://storage.kernelci.org/next/master/next-20200929/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html

Gasp...

I'll have a look tomorrow. Unfortunately I don't have access to a
board with a raw NAND on it right now so I cannot test easily.

Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-09-29 16:31       ` Fabio Estevam
  2020-09-29 17:46         ` Miquel Raynal
@ 2020-09-30 14:58         ` Miquel Raynal
  2020-10-01 21:39           ` Fabio Estevam
  1 sibling, 1 reply; 19+ messages in thread
From: Miquel Raynal @ 2020-09-30 14:58 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Sascha Hauer, linux-mtd, Sascha Hauer

Hello,

Fabio Estevam <festevam@gmail.com> wrote on Tue, 29 Sep 2020 13:31:03
-0300:

> Hi Miquel,
> 
> On Tue, Sep 29, 2020 at 8:39 AM Fabio Estevam <festevam@gmail.com> wrote:
> 
> > linux-next from 20200928 still reports the same error:
> >
> > https://storage.kernelci.org/next/master/next-20200928/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html
> >
> > I checked that the fix pointed out by Sascha is not present in this tree though.
> >
> > I do see it fixed in linux-next from today (20200929), but the report
> > from 20200929 is not yet available.
> >
> > I will let you know after kernelci publishes the boot results from today's next.  
> 
> linux-next 20200929 has an even worse log with a new division by zero:
> 
> https://storage.kernelci.org/next/master/next-20200929/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html

I found a board (NTC C.H.I.P, sun5i R8 SoC) with a parallel NAND.

with the same DT properties but a different NAND controller driver I
could not reproduce the issue.

However, I did tried with soft BCH and I found a related error which I
just fixed. I also got a bug report from Intel's robot which I also
fixed. Perhaps what you see is related (still around this ->total entry
not being set at the right moment at probe time).

If tomorrow's report still returns an error, we will need someone
to get physical access to the device to add debugging code and track
down the failure.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-09-30 14:58         ` Miquel Raynal
@ 2020-10-01 21:39           ` Fabio Estevam
  2020-10-13 17:14             ` Lucas Stach
  0 siblings, 1 reply; 19+ messages in thread
From: Fabio Estevam @ 2020-10-01 21:39 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: Sascha Hauer, linux-mtd, Sascha Hauer

Hi Miquel,

On Wed, Sep 30, 2020 at 11:58 AM Miquel Raynal
<miquel.raynal@bootlin.com> wrote:

> I found a board (NTC C.H.I.P, sun5i R8 SoC) with a parallel NAND.
>
> with the same DT properties but a different NAND controller driver I
> could not reproduce the issue.
>
> However, I did tried with soft BCH and I found a related error which I
> just fixed. I also got a bug report from Intel's robot which I also
> fixed. Perhaps what you see is related (still around this ->total entry
> not being set at the right moment at probe time).
>
> If tomorrow's report still returns an error, we will need someone
> to get physical access to the device to add debugging code and track
> down the failure.

The linux-next 20201001 results from the kernelci Pengutronix lab did
not show up, so let's wait to see the imx27 boot log to be back online
again.

Thanks,

Fabio Estevam

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-10-01 21:39           ` Fabio Estevam
@ 2020-10-13 17:14             ` Lucas Stach
  2020-10-13 17:36               ` Miquel Raynal
  2020-10-14 12:23               ` Fabio Estevam
  0 siblings, 2 replies; 19+ messages in thread
From: Lucas Stach @ 2020-10-13 17:14 UTC (permalink / raw)
  To: Fabio Estevam, Miquel Raynal; +Cc: Sascha Hauer, linux-mtd, Sascha Hauer

On Do, 2020-10-01 at 18:39 -0300, Fabio Estevam wrote:
> Hi Miquel,
> 
> On Wed, Sep 30, 2020 at 11:58 AM Miquel Raynal
> <miquel.raynal@bootlin.com> wrote:
> 
> > I found a board (NTC C.H.I.P, sun5i R8 SoC) with a parallel NAND.
> > 
> > with the same DT properties but a different NAND controller driver I
> > could not reproduce the issue.
> > 
> > However, I did tried with soft BCH and I found a related error which I
> > just fixed. I also got a bug report from Intel's robot which I also
> > fixed. Perhaps what you see is related (still around this ->total entry
> > not being set at the right moment at probe time).
> > 
> > If tomorrow's report still returns an error, we will need someone
> > to get physical access to the device to add debugging code and track
> > down the failure.
> 
> The linux-next 20201001 results from the kernelci Pengutronix lab did
> not show up, so let's wait to see the imx27 boot log to be back online
> again.

Just a heads up: our lab was broken for some time due to a local issue.
It's now back to working and the backlog of jobs is being executed on
the boards right now, so results should show up in the near furture.

Regards,
Lucas


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-10-13 17:14             ` Lucas Stach
@ 2020-10-13 17:36               ` Miquel Raynal
  2020-10-14 12:23               ` Fabio Estevam
  1 sibling, 0 replies; 19+ messages in thread
From: Miquel Raynal @ 2020-10-13 17:36 UTC (permalink / raw)
  To: Lucas Stach; +Cc: linux-mtd, Sascha Hauer, Fabio Estevam, Sascha Hauer

Hi Lucas,

Lucas Stach <l.stach@pengutronix.de> wrote on Tue, 13 Oct 2020 19:14:21
+0200:

> On Do, 2020-10-01 at 18:39 -0300, Fabio Estevam wrote:
> > Hi Miquel,
> > 
> > On Wed, Sep 30, 2020 at 11:58 AM Miquel Raynal
> > <miquel.raynal@bootlin.com> wrote:
> >   
> > > I found a board (NTC C.H.I.P, sun5i R8 SoC) with a parallel NAND.
> > > 
> > > with the same DT properties but a different NAND controller driver I
> > > could not reproduce the issue.
> > > 
> > > However, I did tried with soft BCH and I found a related error which I
> > > just fixed. I also got a bug report from Intel's robot which I also
> > > fixed. Perhaps what you see is related (still around this ->total entry
> > > not being set at the right moment at probe time).
> > > 
> > > If tomorrow's report still returns an error, we will need someone
> > > to get physical access to the device to add debugging code and track
> > > down the failure.  
> > 
> > The linux-next 20201001 results from the kernelci Pengutronix lab did
> > not show up, so let's wait to see the imx27 boot log to be back online
> > again.  
> 
> Just a heads up: our lab was broken for some time due to a local issue.
> It's now back to working and the backlog of jobs is being executed on
> the boards right now, so results should show up in the near furture.

Understood. Based on the previous reports shared by Fabio I tried to
forge the html links toward more recent reports but it always failed,
now I know why :)

Cheers,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-10-13 17:14             ` Lucas Stach
  2020-10-13 17:36               ` Miquel Raynal
@ 2020-10-14 12:23               ` Fabio Estevam
  2020-10-14 13:26                 ` Miquel Raynal
  1 sibling, 1 reply; 19+ messages in thread
From: Fabio Estevam @ 2020-10-14 12:23 UTC (permalink / raw)
  To: Lucas Stach; +Cc: Sascha Hauer, linux-mtd, Sascha Hauer, Miquel Raynal

Hi Lucas,

On Tue, Oct 13, 2020 at 2:14 PM Lucas Stach <l.stach@pengutronix.de> wrote:

> Just a heads up: our lab was broken for some time due to a local issue.
> It's now back to working and the backlog of jobs is being executed on
> the boards right now, so results should show up in the near furture.

Thanks. kernelci results are showing up again.

Hi Miquel,

The ECC issues are still present on imx27-phytec-phycard-s-rdk:
https://storage.kernelci.org/next/master/next-20201013/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html

BTW, ECC errors are also reported on a Freescale Layerscape 2088A RDB Board:
https://www.spinics.net/lists/iommu/msg49772.html

Regards,

Fabio Estevam

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-10-14 12:23               ` Fabio Estevam
@ 2020-10-14 13:26                 ` Miquel Raynal
  2020-10-15 19:24                   ` Fabio Estevam
                                     ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Miquel Raynal @ 2020-10-14 13:26 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Sascha Hauer, linux-mtd, Sascha Hauer, Lucas Stach

Hi Fabio, Sascha, Lucas,

Fabio Estevam <festevam@gmail.com> wrote on Wed, 14 Oct 2020 09:23:06
-0300:

> Hi Lucas,
> 
> On Tue, Oct 13, 2020 at 2:14 PM Lucas Stach <l.stach@pengutronix.de> wrote:
> 
> > Just a heads up: our lab was broken for some time due to a local issue.
> > It's now back to working and the backlog of jobs is being executed on
> > the boards right now, so results should show up in the near furture.  
> 
> Thanks. kernelci results are showing up again.
> 
> Hi Miquel,
> 
> The ECC issues are still present on imx27-phytec-phycard-s-rdk:
> https://storage.kernelci.org/next/master/next-20201013/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html
> 
> BTW, ECC errors are also reported on a Freescale Layerscape 2088A RDB Board:
> https://www.spinics.net/lists/iommu/msg49772.html
> 

I supposed the failing division is this one:

        /*
         * Set the number of read / write steps for one page depending on ECC
         * mode.
         */
        ecc->steps = mtd->writesize / ecc->size;
        if (ecc->steps * ecc->size != mtd->writesize) {
                WARN(1, "Invalid ECC parameters\n");
                ret = -EINVAL;
                goto err_nand_manuf_cleanup;
        }

Which produces the warning right after. This would mean that

	ecc->size == 0

But this entry is set before calling nand_scan() in mxcnd_probe() to
512, and that does not make sense.

I guess we should be able to reproduce this error with any board using
the mxc NAND driver with hardware correction (now also called "on
host"). Do you have such a board available to at least verify that the
beginning of my logic is right?

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-10-14 13:26                 ` Miquel Raynal
@ 2020-10-15 19:24                   ` Fabio Estevam
  2020-10-16  3:04                   ` Han Xu
  2020-10-16  6:39                   ` Sascha Hauer
  2 siblings, 0 replies; 19+ messages in thread
From: Fabio Estevam @ 2020-10-15 19:24 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: Sascha Hauer, linux-mtd, Sascha Hauer, Lucas Stach

Hi Miquel,

On Wed, Oct 14, 2020 at 10:27 AM Miquel Raynal
<miquel.raynal@bootlin.com> wrote:

> I guess we should be able to reproduce this error with any board using
> the mxc NAND driver with hardware correction (now also called "on
> host"). Do you have such a board available to at least verify that the
> beginning of my logic is right?

I don't have access to such hardware, sorry.

Thanks

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-10-14 13:26                 ` Miquel Raynal
  2020-10-15 19:24                   ` Fabio Estevam
@ 2020-10-16  3:04                   ` Han Xu
  2020-10-16  6:39                   ` Sascha Hauer
  2 siblings, 0 replies; 19+ messages in thread
From: Han Xu @ 2020-10-16  3:04 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: linux-mtd, Sascha Hauer, Fabio Estevam, Sascha Hauer, Lucas Stach

On Wed, Oct 14, 2020 at 8:32 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hi Fabio, Sascha, Lucas,
>
> Fabio Estevam <festevam@gmail.com> wrote on Wed, 14 Oct 2020 09:23:06
> -0300:
>
> > Hi Lucas,
> >
> > On Tue, Oct 13, 2020 at 2:14 PM Lucas Stach <l.stach@pengutronix.de> wrote:
> >
> > > Just a heads up: our lab was broken for some time due to a local issue.
> > > It's now back to working and the backlog of jobs is being executed on
> > > the boards right now, so results should show up in the near furture.
> >
> > Thanks. kernelci results are showing up again.
> >
> > Hi Miquel,
> >
> > The ECC issues are still present on imx27-phytec-phycard-s-rdk:
> > https://storage.kernelci.org/next/master/next-20201013/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html
> >
> > BTW, ECC errors are also reported on a Freescale Layerscape 2088A RDB Board:
> > https://www.spinics.net/lists/iommu/msg49772.html
> >
>
> I supposed the failing division is this one:
>
>         /*
>          * Set the number of read / write steps for one page depending on ECC
>          * mode.
>          */
>         ecc->steps = mtd->writesize / ecc->size;
>         if (ecc->steps * ecc->size != mtd->writesize) {
>                 WARN(1, "Invalid ECC parameters\n");
>                 ret = -EINVAL;
>                 goto err_nand_manuf_cleanup;
>         }
>
> Which produces the warning right after. This would mean that
>
>         ecc->size == 0
>
> But this entry is set before calling nand_scan() in mxcnd_probe() to
> 512, and that does not make sense.
>
> I guess we should be able to reproduce this error with any board using
> the mxc NAND driver with hardware correction (now also called "on
> host"). Do you have such a board available to at least verify that the
> beginning of my logic is right?

Hi Miquel,

I debugged on one LS1043A platform and found in rawnand_dt_init(), the
chip->ecc.strength was set to nand->ecc.user_conf.strength, which may
not have been touched before. Same as chip->ecc.size.

>
> Thanks,
> Miquèl
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/



-- 
Sincerely,

Han XU

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-10-14 13:26                 ` Miquel Raynal
  2020-10-15 19:24                   ` Fabio Estevam
  2020-10-16  3:04                   ` Han Xu
@ 2020-10-16  6:39                   ` Sascha Hauer
  2020-10-16  7:53                     ` Miquel Raynal
  2 siblings, 1 reply; 19+ messages in thread
From: Sascha Hauer @ 2020-10-16  6:39 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: linux-mtd, Fabio Estevam, Sascha Hauer, Lucas Stach

Hi Miquel,

On Wed, Oct 14, 2020 at 03:26:59PM +0200, Miquel Raynal wrote:
> Hi Fabio, Sascha, Lucas,
> 
> > 
> > The ECC issues are still present on imx27-phytec-phycard-s-rdk:
> > https://storage.kernelci.org/next/master/next-20201013/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html
> > 
> > BTW, ECC errors are also reported on a Freescale Layerscape 2088A RDB Board:
> > https://www.spinics.net/lists/iommu/msg49772.html
> > 
> 
> I supposed the failing division is this one:
> 
>         /*
>          * Set the number of read / write steps for one page depending on ECC
>          * mode.
>          */
>         ecc->steps = mtd->writesize / ecc->size;
>         if (ecc->steps * ecc->size != mtd->writesize) {
>                 WARN(1, "Invalid ECC parameters\n");
>                 ret = -EINVAL;
>                 goto err_nand_manuf_cleanup;
>         }
> 
> Which produces the warning right after. This would mean that
> 
> 	ecc->size == 0
> 
> But this entry is set before calling nand_scan() in mxcnd_probe() to
> 512, and that does not make sense.
> 
> I guess we should be able to reproduce this error with any board using
> the mxc NAND driver with hardware correction (now also called "on
> host"). Do you have such a board available to at least verify that the
> beginning of my logic is right?

We have a board, I'll give it a test

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: imx27: Unsupported ECC algorithm
  2020-10-16  6:39                   ` Sascha Hauer
@ 2020-10-16  7:53                     ` Miquel Raynal
  0 siblings, 0 replies; 19+ messages in thread
From: Miquel Raynal @ 2020-10-16  7:53 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: linux-mtd, Fabio Estevam, Sascha Hauer, Lucas Stach

Hello,

Sascha Hauer <s.hauer@pengutronix.de> wrote on Fri, 16 Oct 2020
08:39:10 +0200:

> Hi Miquel,
> 
> On Wed, Oct 14, 2020 at 03:26:59PM +0200, Miquel Raynal wrote:
> > Hi Fabio, Sascha, Lucas,
> > 
> > > 
> > > The ECC issues are still present on imx27-phytec-phycard-s-rdk:
> > > https://storage.kernelci.org/next/master/next-20201013/arm/imx_v4_v5_defconfig/gcc-8/lab-pengutronix/baseline-imx27-phytec-phycard-s-rdk.html
> > > 
> > > BTW, ECC errors are also reported on a Freescale Layerscape 2088A RDB Board:
> > > https://www.spinics.net/lists/iommu/msg49772.html
> > > 
> > 
> > I supposed the failing division is this one:
> > 
> >         /*
> >          * Set the number of read / write steps for one page depending on ECC
> >          * mode.
> >          */
> >         ecc->steps = mtd->writesize / ecc->size;
> >         if (ecc->steps * ecc->size != mtd->writesize) {
> >                 WARN(1, "Invalid ECC parameters\n");
> >                 ret = -EINVAL;
> >                 goto err_nand_manuf_cleanup;
> >         }
> > 
> > Which produces the warning right after. This would mean that
> > 
> > 	ecc->size == 0
> > 
> > But this entry is set before calling nand_scan() in mxcnd_probe() to
> > 512, and that does not make sense.
> > 
> > I guess we should be able to reproduce this error with any board using
> > the mxc NAND driver with hardware correction (now also called "on
> > host"). Do you have such a board available to at least verify that the
> > beginning of my logic is right?
> 
> We have a board, I'll give it a test

Thanks to Han's analysis I may have found the issue. Please have a look
at [1].

Sascha, if you reproduce the error you may also want to test this patch.

[1] https://patchwork.ozlabs.org/project/linux-mtd/patch/20201016074942.29650-1-miquel.raynal@bootlin.com/

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-10-16  7:54 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 13:49 imx27: Unsupported ECC algorithm Fabio Estevam
2020-09-17 16:13 ` Miquel Raynal
2020-09-17 16:45   ` Miquel Raynal
2020-09-17 17:12     ` Fabio Estevam
2020-09-21  9:40 ` Sascha Hauer
2020-09-28 15:20   ` Miquel Raynal
2020-09-29 11:39     ` Fabio Estevam
2020-09-29 16:31       ` Fabio Estevam
2020-09-29 17:46         ` Miquel Raynal
2020-09-30 14:58         ` Miquel Raynal
2020-10-01 21:39           ` Fabio Estevam
2020-10-13 17:14             ` Lucas Stach
2020-10-13 17:36               ` Miquel Raynal
2020-10-14 12:23               ` Fabio Estevam
2020-10-14 13:26                 ` Miquel Raynal
2020-10-15 19:24                   ` Fabio Estevam
2020-10-16  3:04                   ` Han Xu
2020-10-16  6:39                   ` Sascha Hauer
2020-10-16  7:53                     ` Miquel Raynal

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).