linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [BUG] Nand support broken with v2.6.36-rc1
@ 2010-08-17 11:36 Michael Guntsche
  2010-08-17 17:00 ` Brian Norris
  0 siblings, 1 reply; 13+ messages in thread
From: Michael Guntsche @ 2010-08-17 11:36 UTC (permalink / raw)
  To: Brian Norris, linux-mtd, linux-kernel

Hello again,

Answering my own question here. Yes indeed with the new code a driver
change seems to be needed. The badblock pattern used with this nand is no longer
supported with the stock kernel code. I added this to the nand driver
itself.

static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
static struct nand_bbt_descr rbppc_nand_smallpage = {
  .options = NAND_BBT_SCAN2NDPAGE,
  .offs = NAND_SMALL_BADBLOCK_POS,
  .len = 1,
  .pattern = scan_ff_pattern
};

and the driver is working again. But shouldn't this be supported by the stock level code as well?

Kind regards,
Michael Guntsche

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [BUG] Nand support broken with v2.6.36-rc1
@ 2010-08-17  8:52 Michael Guntsche
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Guntsche @ 2010-08-17  8:52 UTC (permalink / raw)
  To: Brian Norris, linux-mtd, linux-kernel

Hello,

First of all, please CC me on any replies since I am not subscribed to one of the MLs.

I just tried compiling 2.6.36-rc1 for one of my embedded boards here and
noticed that nand support was apparently broken with -rc1. 
In the syslog I see:

[  231.039693] rbppc_nand_probe: MikroTik RouterBOARD 600 series NAND
driver, version 0.0.2
[  231.048103] NAND device: Manufacturer ID: 0xad, Chip ID: 0x76 (Hynix
NAND 64MiB 3,3V 8-bit)

This is the board I am using and the nand driver worked from 2.6.27 up
to 2.6.35 with no modifications

[  231.056590] Scanning device for bad blocks
[  231.063908] Bad eraseblock 56 at 0x0000000e0000
[  231.068589] Bad eraseblock 57 at 0x0000000e4000
[  231.073194] Bad eraseblock 58 at 0x0000000e8000
[  231.077870] Bad eraseblock 59 at 0x0000000ec000
[  231.082482] Bad eraseblock 60 at 0x0000000f0000
[  231.087146] Bad eraseblock 61 at 0x0000000f4000
......
This continues for a long time

I know that this device has two badblocks. But with the new code almost
all blocks are marked as bad. 
I tracked this down to commit:

c7b28e25cb9beb943aead770ff14551b55fa8c79
 mtd: nand: refactor BB marker detection

Reverting the code under drivers/mtd/nand to an earlier commit makes it
work again.
The only thing that might be special with the nand driver that is being
used is that a different oob layout is being used.

static struct nand_ecclayout rbppc_nand_oob_16 = {
  .eccbytes = 6,
  .eccpos = { 8, 9, 10, 13, 14, 15 },
  .oobavail = 9,
  .oobfree = { { 0, 4 }, { 6, 2 }, { 11, 2 }, { 4, 1 } }
};

I am not sure if a driver change is needed, but seeing that the commit did not touch any specific nand driver code I do not think that this is the problem here.

Maybe someone more knowledgeable than me can take a look at it.

Kind regards,
Michael Guntsche

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

end of thread, other threads:[~2010-08-19  0:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-17 11:36 [BUG] Nand support broken with v2.6.36-rc1 Michael Guntsche
2010-08-17 17:00 ` Brian Norris
2010-08-17 17:47   ` Michael Guntsche
2010-08-17 18:49     ` Brian Norris
2010-08-17 20:06       ` Michael Guntsche
2010-08-17 21:42         ` Brian Norris
2010-08-18  5:53           ` Michael Guntsche
2010-08-17 20:59   ` Abdoulaye Walsimou GAYE
2010-08-17 22:07     ` Brian Norris
2010-08-18 18:25   ` [PATCH] mtd: nand: Fix regression in BBM detection Brian Norris
2010-08-18 19:30     ` Abdoulaye Walsimou GAYE
2010-08-19  0:04       ` Brian Norris
  -- strict thread matches above, loose matches on Subject: below --
2010-08-17  8:52 [BUG] Nand support broken with v2.6.36-rc1 Michael Guntsche

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