All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: GPMI nand flash ECC errors with mainline kernel
       [not found] <HE1PR0702MB362877849767B637814CF9B6FF930@HE1PR0702MB3628.eurprd07.prod.outlook.com>
@ 2018-05-15 11:59 ` Miquel Raynal
       [not found]   ` <HE1PR0702MB36288289EA58B7D0B5368A9FFF930@HE1PR0702MB3628.eurprd07.prod.outlook.com>
  2018-05-15 13:49 ` Boris Brezillon
  1 sibling, 1 reply; 5+ messages in thread
From: Miquel Raynal @ 2018-05-15 11:59 UTC (permalink / raw)
  To: Cardoen Pieter
  Cc: han.xu, boris.brezillon, richard, dwmw2, computersforpeace,
	marek.vasut, cyrille.pitchen, linux-mtd

Hi Cardoen,

> I am currently trying to use the mainline kernel on a custom imx6ul board with an SLC NAND flash device (29F4G08ABADAH4). When the rootfs is mounted, I get continuously ECC errors (see log below).
> 
> I am however sure that the rootfs is programmed. The device boots with an older kernel version on the same device.
> 
> I also noticed that with my previous kernel version, it used mtd->_read in function mtd_read while now it is using mtd->_read_oob.
> 
> Can someone assist me how to debug this issue?

I don't think the problem comes from changes in the core.
It is possibly related to one of these two commits:

b1206122069a mtd: rawnand: gpmi: use core timings instead of an empirical derivation
76e1a0086a0c mtd: rawnand: gpmi: support ->setup_data_interface()

Can you please revert the first one, check if it changes something, and
if it still fails revert also the second one?

Thanks,
Miquèl

> nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
> nand: Micron MT29F4G08ABADAH4
> nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
> gpmi-nand 1806000.gpmi-nand: enable the asynchronous EDO mode 5
> Bad block table not found for chip 0
> Bad block table not found for chip 0
> Scanning device for bad blocks
> Bad eraseblock 1692 at 0x00000d380000
> Bad eraseblock 1694 at 0x00000d3c0000
> Bad eraseblock 1696 at 0x00000d400000
> Bad eraseblock 1698 at 0x00000d440000
> Bad eraseblock 1700 at 0x00000d480000
> Bad eraseblock 1702 at 0x00000d4c0000
> Bad eraseblock 1704 at 0x00000d500000
> Bad block table written to 0x00001ffe0000, version 0x01
> Bad block table written to 0x00001ffc0000, version 0x01
> 1 cmdlinepart partitions found on MTD device gpmi-nand
> Creating 1 MTD partitions on "gpmi-nand":
> 0x000000000000-0x000020000000 : "nandflash"
> gpmi-nand 1806000.gpmi-nand: driver registered.
> ubi0: attaching mtd0
> ubi0 warning: 0xc02d6658: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
> ubi0 warning: 0xc02d6658: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
> ubi0 warning: 0xc02d6658: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry
> ubi0 error: 0xc02d66e8: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
> CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0+ #65
> Hardware name: Freescale i.MX6 Ultralite (Device Tree)
> Function entered at [<c010c0a0>] from [<c010a780>]
> Function entered at [<c010a780>] from [<c02d66ec>]
> Function entered at [<c02d66ec>] from [<c02d69e0>]
> Function entered at [<c02d69e0>] from [<c02db408>]
> Function entered at [<c02db408>] from [<c02dc8c0>]
> Function entered at [<c02dc8c0>] from [<c02d114c>]
> Function entered at [<c02d114c>] from [<c051c678>]
> Function entered at [<c051c678>] from [<c01024bc>]
> Function entered at [<c01024bc>] from [<c0500c70>]
> Function entered at [<c0500c70>] from [<c0317958>]
> Function entered at [<c0317958>] from [<c01010e8>]
> Exception stack(0xdf04dfb0 to 0xdf04dff8)
> dfa0:                                     00000000 00000000 00000000 00000000
> dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
> ubi0 warning: 0xc02d6658: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read only 64 bytes, retry
> ubi0 warning: 0xc02d6658: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read only 64 bytes, retry
> ubi0 warning: 0xc02d6658: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read only 64 bytes, retry
> ubi0 error: 0xc02d66e8: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read 64 bytes
> CPU: 0 PID: 1 Comm: swapper Not tainted 4.15.0+ #65
> Hardware name: Freescale i.MX6 Ultralite (Device Tree)
> Function entered at [<c010c0a0>] from [<c010a780>]
> Function entered at [<c010a780>] from [<c02d66ec>]
> Function entered at [<c02d66ec>] from [<c02d69e0>]
> Function entered at [<c02d69e0>] from [<c02db408>]
> Function entered at [<c02db408>] from [<c02dc8c0>]
> Function entered at [<c02dc8c0>] from [<c02d114c>]
> Function entered at [<c02d114c>] from [<c051c678>]
> Function entered at [<c051c678>] from [<c01024bc>]
> Function entered at [<c01024bc>] from [<c0500c70>]
> Function entered at [<c0500c70>] from [<c0317958>]
> Function entered at [<c0317958>] from [<c01010e8>]
> Exception stack(0xdf04dfb0 to 0xdf04dff8)
> 
> 
> 
> 

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

* Re: GPMI nand flash ECC errors with mainline kernel
       [not found]   ` <HE1PR0702MB36288289EA58B7D0B5368A9FFF930@HE1PR0702MB3628.eurprd07.prod.outlook.com>
@ 2018-05-15 13:36     ` Miquel Raynal
       [not found]       ` <HE1PR0702MB3628CC11A1E13A0C740F1CDDFF930@HE1PR0702MB3628.eurprd07.prod.outlook.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Miquel Raynal @ 2018-05-15 13:36 UTC (permalink / raw)
  To: Cardoen Pieter
  Cc: han.xu, boris.brezillon, richard, dwmw2, computersforpeace,
	marek.vasut, cyrille.pitchen, linux-mtd

Hi Cardoen,

First, can you please subscribe to the MTD mailing-list [1] or fix
your mailer, it looks like your issue did not reach the community and
only the cc:'ed people received it (It was bumped to me).

[1] http://www.linux-mtd.infradead.org/mail.html

> I was a little behind the current master (I started on this a month ago). This commit wasn't yet applied so this couldn't be the cause of the issue. I'll retried with the current master branch and had the same result.

Can you please share the exact kernel version you are testing?
Do you apply patches on top of it?
What is your device tree?

> I will revert these commits and try again but I don't think this will help as i had it already before these patches were applied.

You can test with the latest patches [2] to verify the problem is still
there but no need to try to revert these commits if the problem was
already present before.

[2] http://git.infradead.org/linux-mtd.git/shortlog/refs/heads/master

Thanks,
Miquèl

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

* Re: GPMI nand flash ECC errors with mainline kernel
       [not found] <HE1PR0702MB362877849767B637814CF9B6FF930@HE1PR0702MB3628.eurprd07.prod.outlook.com>
  2018-05-15 11:59 ` GPMI nand flash ECC errors with mainline kernel Miquel Raynal
@ 2018-05-15 13:49 ` Boris Brezillon
  1 sibling, 0 replies; 5+ messages in thread
From: Boris Brezillon @ 2018-05-15 13:49 UTC (permalink / raw)
  To: Cardoen Pieter
  Cc: han.xu, boris.brezillon, richard, dwmw2, computersforpeace,
	marek.vasut, cyrille.pitchen, linux-mtd

On Tue, 15 May 2018 11:46:32 +0000
Cardoen Pieter <P.Cardoen@TELEVIC.com> wrote:

> Dear
> 
> I am currently trying to use the mainline kernel on a custom imx6ul board with an SLC NAND flash device (29F4G08ABADAH4). When the rootfs is mounted, I get continuously ECC errors (see log below).
> 
> I am however sure that the rootfs is programmed. The device boots with an older kernel version on the same device.

Which version works? Is this a vendor tree or a mainline kernel? Looks
like the version that fails is 4.15. Are you sure the ECC config is
exactly the same between the old and new kernel?

> 
> I also noticed that with my previous kernel version, it used mtd->_read in function mtd_read while now it is using mtd->_read_oob.

It's unlikely to be the root cause for these ECC failures.

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

* Re: GPMI nand flash ECC errors with mainline kernel
       [not found]         ` <HE1PR0702MB36280A19BA89FA74BB3AACE8FF930@HE1PR0702MB3628.eurprd07.prod.outlook.com>
@ 2018-05-17 12:58           ` Miquel Raynal
  2018-05-17 13:05             ` Richard Weinberger
  0 siblings, 1 reply; 5+ messages in thread
From: Miquel Raynal @ 2018-05-17 12:58 UTC (permalink / raw)
  To: Cardoen Pieter
  Cc: han.xu, boris.brezillon, richard, dwmw2, computersforpeace,
	marek.vasut, cyrille.pitchen, linux-mtd

Hi Cardoen,

FYI your emails are still not reaching the MTD ML.

On Thu, 17 May 2018 07:45:43 +0000, Cardoen Pieter
<P.Cardoen@TELEVIC.com> wrote:

> Dear Miquel
> 
> 
> I've been continuing debugging. When the gpmi driver is loaded, the device gets scanned for bad blocks. In that case nand_read_oob is executed and this results in a call to nand_do_read_oob:
> 
> 
>     if (!ops->datbuf)
>         ret = nand_do_read_oob(mtd, from, ops);
>     else
>         ret = nand_do_read_ops(mtd, from, ops);
> 
> 
> But if the nand flash gets mounted, nand_read_oob is also executed but it results in nand_do_read_ops and I don't see that the read functions of the gpmi driver are executed.
> 
> 
> Hopefully, this can help to find the solution of this issue.

Unfortunately I doubt this is the root cause for the ECC errors neither.

Could you also please answer Boris's questions:

> > Which version works? Is this a vendor tree or a mainline kernel? Looks
> > like the version that fails is 4.15. Are you sure the ECC config is
> > exactly the same between the old and new kernel?

Thanks,
Miquèl

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

* Re: GPMI nand flash ECC errors with mainline kernel
  2018-05-17 12:58           ` Miquel Raynal
@ 2018-05-17 13:05             ` Richard Weinberger
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Weinberger @ 2018-05-17 13:05 UTC (permalink / raw)
  To: Miquel Raynal
  Cc: Cardoen Pieter, han.xu, boris.brezillon, dwmw2,
	computersforpeace, marek.vasut, cyrille.pitchen, linux-mtd

Am Donnerstag, 17. Mai 2018, 14:58:37 CEST schrieb Miquel Raynal:
> Hi Cardoen,
> 
> FYI your emails are still not reaching the MTD ML.

Yep, please don't send HTML mails.

Thanks,
//richard

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

end of thread, other threads:[~2018-05-17 13:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <HE1PR0702MB362877849767B637814CF9B6FF930@HE1PR0702MB3628.eurprd07.prod.outlook.com>
2018-05-15 11:59 ` GPMI nand flash ECC errors with mainline kernel Miquel Raynal
     [not found]   ` <HE1PR0702MB36288289EA58B7D0B5368A9FFF930@HE1PR0702MB3628.eurprd07.prod.outlook.com>
2018-05-15 13:36     ` Miquel Raynal
     [not found]       ` <HE1PR0702MB3628CC11A1E13A0C740F1CDDFF930@HE1PR0702MB3628.eurprd07.prod.outlook.com>
     [not found]         ` <HE1PR0702MB36280A19BA89FA74BB3AACE8FF930@HE1PR0702MB3628.eurprd07.prod.outlook.com>
2018-05-17 12:58           ` Miquel Raynal
2018-05-17 13:05             ` Richard Weinberger
2018-05-15 13:49 ` Boris Brezillon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.