linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sean Nyekjaer <sean@geanix.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: mkl@pengutronix.de, "Sascha Hauer" <s.hauer@pengutronix.de>,
	linux-mtd@lists.infradead.org,
	"Martin Hundebøll" <martin@geanix.com>
Subject: Re: [Bug] mtd: rawnand: gpmi
Date: Thu, 19 Sep 2019 14:15:22 +0200	[thread overview]
Message-ID: <6c0a1fdb-45cc-87aa-d1fb-f07f7e21a4a5@geanix.com> (raw)
In-Reply-To: <20190919132719.3ca48967@xps13>


>> Hi Sascha
>>
>> Please let me know when you have some time to look into this :-)
>> I dosen't seem right that it writes the bbt on a 4.19 series kernel twice
>>
> 
> For me the disturbing part is:
> 
>>>>> [    4.175918] Bad block table not found for chip 0
>>>>> [    4.184059] Bad block table not found for chip 0
> 
> Writing the BBT twice is expected.
> 
> Thanks,
> Miquèl
> 

Hi,

Tried this:

diff --git a/drivers/mtd/nand/raw/nand_bbt.c 
b/drivers/mtd/nand/raw/nand_bbt.c
index 39db352f8757..b0337f8a0da4 100644
--- a/drivers/mtd/nand/raw/nand_bbt.c
+++ b/drivers/mtd/nand/raw/nand_bbt.c
@@ -1200,6 +1200,8 @@ static int nand_scan_bbt(struct mtd_info *mtd, 
struct nand_bbt_descr *bd)
         if (res)
                 goto err;

+       search_read_bbts(mtd, buf, td, md);
+
         /* Prevent the bbt regions from erasing / writing */
         mark_bbt_region(mtd, td);
         if (md

Result is:

[    2.191412] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xdc 
 

[    2.198095] nand: Toshiba NAND 512MiB 3,3V 8-bit 

[    2.202848] nand: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, 
OOB size: 128 

[    2.217337] Bad block table not found for chip 0 
 

[    2.225535] Bad block table not found for chip 0 
 

[    2.230475] Scanning device for bad blocks 
 

[    2.749832] Bad eraseblock 798 at 0x00000c780000
[    3.230712] Bad eraseblock 1536 at 0x000018000000
[    3.236263] Bad eraseblock 1537 at 0x000018040000
[    3.574122] Bad block table written to 0x00001ffc0000, version 0x01
[    3.584874] Bad block table written to 0x00001ff80000, version 0x01
[    3.592306] Bad block table found at page 131008, version 0x01 
 

[    3.600059] Bad block table found at page 130944, version 0x01
[    3.607129] 3 fixed-partitions partitions found on MTD device 
gpmi-nand 

[    3.614105] Creating 3 MTD partitions on "gpmi-nand":
[    3.619540] 0x000000000000-0x000000800000 : "boot"
[    3.635437] 0x000000800000-0x00001ca00000 : "ubi"
[    4.018183] 0x00001ca00000-0x000020000000 : "testing" 
 

[    4.070734] gpmi-nand 1806000.gpmi-nand: driver registered.

Seems like it's U-boot that is corrupting the table.

But I don't think it's related to the original issue with commit
ef347c0cfd619a9251e5a2f9ff72e33650a9bccb

/Sean

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

  reply	other threads:[~2019-09-19 12:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 20:26 [Bug] mtd: rawnand: gpmi Sean Nyekjaer
2019-09-05 20:39 ` Marc Kleine-Budde
     [not found]   ` <E8555824-943E-45B4-A0ED-D42E13156EEC@geanix.com>
2019-09-06  7:01     ` Marc Kleine-Budde
2019-09-06  7:12 ` Sascha Hauer
2019-09-06  9:59   ` Sean Nyekjaer
2019-09-06 10:13     ` Sascha Hauer
2019-09-06 11:06       ` Sean Nyekjaer
2019-09-06 13:28         ` Sascha Hauer
2019-09-06 15:05           ` Sean Nyekjaer
2019-09-10  9:55 ` Sascha Hauer
2019-09-10 10:18   ` Sean Nyekjaer
2019-09-10 10:48     ` Sascha Hauer
2019-09-10 11:00       ` Sean Nyekjaer
2019-09-10 11:08         ` Sascha Hauer
2019-09-10 11:51           ` Sean Nyekjaer
2019-09-19 11:21             ` Sean Nyekjaer
2019-09-19 11:27               ` Miquel Raynal
2019-09-19 12:15                 ` Sean Nyekjaer [this message]
2019-09-20  6:54                   ` Sean Nyekjaer
2019-09-20  9:17                   ` Sascha Hauer
2019-09-23 10:37                     ` Sean Nyekjaer

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=6c0a1fdb-45cc-87aa-d1fb-f07f7e21a4a5@geanix.com \
    --to=sean@geanix.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=martin@geanix.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=mkl@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    /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).