* [BUG] mtd: rawnand: mircon: Cannot detect chip with commit 51f3b3970a8c
@ 2018-07-06 17:03 Dinh Nguyen
2018-07-06 17:20 ` Boris Brezillon
0 siblings, 1 reply; 4+ messages in thread
From: Dinh Nguyen @ 2018-07-06 17:03 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org
Cc: chris.packham, boris.brezillon, miquel.raynal, thor.thayer,
Marek Vasut
Hi,
It looks like commit: "51f3b3970a8c mtd: rawnand: micron: detect forced
on-die ECC" is causing the NAND chip on the SoCFPGA Arria10 devkit to
stop working on linux-next.
If I revert the commit, then the NAND driver is able to detect the NAND
chip.
The NAND chip is a Micron MT29F1G08ABBEAH4 part.
[ 0.741984] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa1
[ 0.748336] nand: Micron MT29F1G08ABBEAH4
[ 0.752330] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
OOB siz
e: 64
[ 0.763358] ecc.mode = 3
[ 0.766312] On-die ECC forcefully enabled, not supported
[ 0.771654] denali-nand-dt: probe of ffb90000.nand failed with error -22
With commit reverted:
[ 0.742481] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa1
[ 0.748833] nand: Micron MT29F1G08ABBEAH4
[ 0.752828] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
OOB siz
e: 64
[ 0.760610] Bad block table found at page 65472, version 0x01
[ 0.766433] Bad block table found at page 65408, version 0x01
[ 0.772464] 2 fixed-partitions partitions found on MTD device denali-nand
[ 0.779247] Creating 2 MTD partitions on "denali-nand":
[ 0.784453] 0x000000000000-0x000001c00000 : "Boot and fpga data"
[ 0.791241] 0x000001c00000-0x000008000000 : "Root Filesystem - JFFS2"
Looks like if I comment out this part of the patch in
drivers/mtd/nand/raw/nand_micron.c
+#if 0
for (i = 0; i < ARRAY_SIZE(micron_on_die_ecc); i++)
if (chip->id.data[1] == micron_on_die_ecc[i])
return MICRON_ON_DIE_MANDATORY;
-
+#endif
then the driver is able to detect the NAND chip again.
Dinh
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [BUG] mtd: rawnand: mircon: Cannot detect chip with commit 51f3b3970a8c
2018-07-06 17:03 [BUG] mtd: rawnand: mircon: Cannot detect chip with commit 51f3b3970a8c Dinh Nguyen
@ 2018-07-06 17:20 ` Boris Brezillon
2018-07-17 21:59 ` Chris Packham
0 siblings, 1 reply; 4+ messages in thread
From: Boris Brezillon @ 2018-07-06 17:20 UTC (permalink / raw)
To: Dinh Nguyen
Cc: linux-mtd@lists.infradead.org, chris.packham, miquel.raynal,
thor.thayer, Marek Vasut
On Fri, 6 Jul 2018 12:03:49 -0500
Dinh Nguyen <dinguyen@kernel.org> wrote:
> Hi,
>
> It looks like commit: "51f3b3970a8c mtd: rawnand: micron: detect forced
> on-die ECC" is causing the NAND chip on the SoCFPGA Arria10 devkit to
> stop working on linux-next.
>
> If I revert the commit, then the NAND driver is able to detect the NAND
> chip.
>
> The NAND chip is a Micron MT29F1G08ABBEAH4 part.
>
>
> [ 0.741984] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa1
> [ 0.748336] nand: Micron MT29F1G08ABBEAH4
> [ 0.752330] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
> OOB siz
> e: 64
> [ 0.763358] ecc.mode = 3
> [ 0.766312] On-die ECC forcefully enabled, not supported
> [ 0.771654] denali-nand-dt: probe of ffb90000.nand failed with error -22
>
> With commit reverted:
>
> [ 0.742481] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa1
> [ 0.748833] nand: Micron MT29F1G08ABBEAH4
> [ 0.752828] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
> OOB siz
> e: 64
> [ 0.760610] Bad block table found at page 65472, version 0x01
> [ 0.766433] Bad block table found at page 65408, version 0x01
> [ 0.772464] 2 fixed-partitions partitions found on MTD device denali-nand
> [ 0.779247] Creating 2 MTD partitions on "denali-nand":
> [ 0.784453] 0x000000000000-0x000001c00000 : "Boot and fpga data"
> [ 0.791241] 0x000001c00000-0x000008000000 : "Root Filesystem - JFFS2"
>
> Looks like if I comment out this part of the patch in
> drivers/mtd/nand/raw/nand_micron.c
>
> +#if 0
> for (i = 0; i < ARRAY_SIZE(micron_on_die_ecc); i++)
> if (chip->id.data[1] == micron_on_die_ecc[i])
> return MICRON_ON_DIE_MANDATORY;
> -
> +#endif
Oops, I overlooked that detail. Testing only the ID bytes is not
enough, because it does not encode whether the NAND has on-die ECC or
not. We should really test the model name here...
Chris, can you prepare a fixup for that?
>
> then the driver is able to detect the NAND chip again.
>
> Dinh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] mtd: rawnand: mircon: Cannot detect chip with commit 51f3b3970a8c
2018-07-06 17:20 ` Boris Brezillon
@ 2018-07-17 21:59 ` Chris Packham
2018-07-17 22:07 ` Boris Brezillon
0 siblings, 1 reply; 4+ messages in thread
From: Chris Packham @ 2018-07-17 21:59 UTC (permalink / raw)
To: Boris Brezillon, Dinh Nguyen
Cc: linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com,
thor.thayer@linux.intel.com, Marek Vasut
Hi Dinh, Boris,
On 07/07/18 05:21, Boris Brezillon wrote:
> On Fri, 6 Jul 2018 12:03:49 -0500
> Dinh Nguyen <dinguyen@kernel.org> wrote:
>
>> Hi,
>>
>> It looks like commit: "51f3b3970a8c mtd: rawnand: micron: detect forced
>> on-die ECC" is causing the NAND chip on the SoCFPGA Arria10 devkit to
>> stop working on linux-next.
>>
>> If I revert the commit, then the NAND driver is able to detect the NAND
>> chip.
>>
>> The NAND chip is a Micron MT29F1G08ABBEAH4 part.
>>
>>
>> [ 0.741984] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa1
>> [ 0.748336] nand: Micron MT29F1G08ABBEAH4
>> [ 0.752330] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
>> OOB siz
>> e: 64
>> [ 0.763358] ecc.mode = 3
>> [ 0.766312] On-die ECC forcefully enabled, not supported
>> [ 0.771654] denali-nand-dt: probe of ffb90000.nand failed with error -22
>>
>> With commit reverted:
>>
>> [ 0.742481] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa1
>> [ 0.748833] nand: Micron MT29F1G08ABBEAH4
>> [ 0.752828] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
>> OOB siz
>> e: 64
>> [ 0.760610] Bad block table found at page 65472, version 0x01
>> [ 0.766433] Bad block table found at page 65408, version 0x01
>> [ 0.772464] 2 fixed-partitions partitions found on MTD device denali-nand
>> [ 0.779247] Creating 2 MTD partitions on "denali-nand":
>> [ 0.784453] 0x000000000000-0x000001c00000 : "Boot and fpga data"
>> [ 0.791241] 0x000001c00000-0x000008000000 : "Root Filesystem - JFFS2"
>>
>> Looks like if I comment out this part of the patch in
>> drivers/mtd/nand/raw/nand_micron.c
>>
>> +#if 0
>> for (i = 0; i < ARRAY_SIZE(micron_on_die_ecc); i++)
>> if (chip->id.data[1] == micron_on_die_ecc[i])
>> return MICRON_ON_DIE_MANDATORY;
>> -
>> +#endif
>
> Oops, I overlooked that detail. Testing only the ID bytes is not
> enough, because it does not encode whether the NAND has on-die ECC or
> not. We should really test the model name here...
>
> Chris, can you prepare a fixup for that?
>
With the latest set of changes is there anything left to do for this? I
think we now have on-die ECC detection that doesn't require checking the ID.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] mtd: rawnand: mircon: Cannot detect chip with commit 51f3b3970a8c
2018-07-17 21:59 ` Chris Packham
@ 2018-07-17 22:07 ` Boris Brezillon
0 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2018-07-17 22:07 UTC (permalink / raw)
To: Chris Packham
Cc: Dinh Nguyen, linux-mtd@lists.infradead.org,
miquel.raynal@bootlin.com, thor.thayer@linux.intel.com,
Marek Vasut
On Tue, 17 Jul 2018 21:59:16 +0000
Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
> Hi Dinh, Boris,
>
> On 07/07/18 05:21, Boris Brezillon wrote:
> > On Fri, 6 Jul 2018 12:03:49 -0500
> > Dinh Nguyen <dinguyen@kernel.org> wrote:
> >
> >> Hi,
> >>
> >> It looks like commit: "51f3b3970a8c mtd: rawnand: micron: detect forced
> >> on-die ECC" is causing the NAND chip on the SoCFPGA Arria10 devkit to
> >> stop working on linux-next.
> >>
> >> If I revert the commit, then the NAND driver is able to detect the NAND
> >> chip.
> >>
> >> The NAND chip is a Micron MT29F1G08ABBEAH4 part.
> >>
> >>
> >> [ 0.741984] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa1
> >> [ 0.748336] nand: Micron MT29F1G08ABBEAH4
> >> [ 0.752330] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
> >> OOB siz
> >> e: 64
> >> [ 0.763358] ecc.mode = 3
> >> [ 0.766312] On-die ECC forcefully enabled, not supported
> >> [ 0.771654] denali-nand-dt: probe of ffb90000.nand failed with error -22
> >>
> >> With commit reverted:
> >>
> >> [ 0.742481] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa1
> >> [ 0.748833] nand: Micron MT29F1G08ABBEAH4
> >> [ 0.752828] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
> >> OOB siz
> >> e: 64
> >> [ 0.760610] Bad block table found at page 65472, version 0x01
> >> [ 0.766433] Bad block table found at page 65408, version 0x01
> >> [ 0.772464] 2 fixed-partitions partitions found on MTD device denali-nand
> >> [ 0.779247] Creating 2 MTD partitions on "denali-nand":
> >> [ 0.784453] 0x000000000000-0x000001c00000 : "Boot and fpga data"
> >> [ 0.791241] 0x000001c00000-0x000008000000 : "Root Filesystem - JFFS2"
> >>
> >> Looks like if I comment out this part of the patch in
> >> drivers/mtd/nand/raw/nand_micron.c
> >>
> >> +#if 0
> >> for (i = 0; i < ARRAY_SIZE(micron_on_die_ecc); i++)
> >> if (chip->id.data[1] == micron_on_die_ecc[i])
> >> return MICRON_ON_DIE_MANDATORY;
> >> -
> >> +#endif
> >
> > Oops, I overlooked that detail. Testing only the ID bytes is not
> > enough, because it does not encode whether the NAND has on-die ECC or
> > not. We should really test the model name here...
> >
> > Chris, can you prepare a fixup for that?
> >
>
> With the latest set of changes is there anything left to do for this? I
> think we now have on-die ECC detection that doesn't require checking the ID.
Yep, I think we're good. Thanks for you help.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-17 22:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-06 17:03 [BUG] mtd: rawnand: mircon: Cannot detect chip with commit 51f3b3970a8c Dinh Nguyen
2018-07-06 17:20 ` Boris Brezillon
2018-07-17 21:59 ` Chris Packham
2018-07-17 22:07 ` Boris Brezillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox