From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Boris Brezillon <boris.brezillon@free-electrons.com>,
Miquel RAYNAL <miquel.raynal@free-electrons.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH v3 0/7] Marvell NAND controller rework with ->exec_op()
Date: Fri, 12 Jan 2018 21:44:27 +0100 [thread overview]
Message-ID: <87wp0majtg.fsf@belgarion.home> (raw)
In-Reply-To: <20180112105228.176ab80f@bbrezillon> (Boris Brezillon's message of "Fri, 12 Jan 2018 10:52:28 +0100")
Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> On Fri, 12 Jan 2018 10:34:13 +0100
> Robert Jarzmik <robert.jarzmik@free.fr> wrote:
>
>> Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> Because we though scanning of BBMs was working with the old pxa driver
> (which should be the case for your setup, BTW), and we thought the new
> driver was introducing a regression here.
That's what happens :
- flash_bbt=1 with old driver => everything works fine
- flash_bbt=1 with marvell_nand => BBT is damaged (or so I believe from
Miquel's analysis)
> BTW, did you ever try with the old driver and ->flash_bbt = false? If
> you did not, can you test?
Sure, just did, same behavior as with marvell_nand :
- bad erase blocks (almost) everywhere
- ubifs error
>> I think we're still not aligned here. There are _no_ bad block markers in the
>> OOB on my flash, because there is a BBT at the end.
>
> That's not how it works. The BBT is a way to get information about bad
> blocks within a single read access, but, if you can preserve BBMs and
> keep them updated (which is the case here), you should do it, just in
> case you lose the BBT.
You're probably right today. But this assertion is probably wrong for system
created in early 2000s ... :)
>> > So, the symptoms we're seeing here, where almost all blocks are reported as
>> > bad when scanning BBMs, is not expected, and that's what we're trying to
>> > debug/fix.
>> Well, I still think this is not something to fix ... I still think that OOB data
>> is not relevant as to the state of bad blocks in my flash ...
>
> Hm, I disagree. What if, for any reason, the BBT is lost? Don't you
> want the full scan to work?
If the BBT is lost, you have the mirror BBT, it's its purpose.
> Okay, so I have another solution for that: drop the NAND_BBT_CREATE and
> NAND_BBT_WRITE here [1] and here [2]. That should let you read the
> existing BBT without updating it or creating a new one if it's not
> detected.
Okay, let's try the marvell-nand-bug branch with this included.
It works :
[ 18.302123] ubi0: attached mtd5 (name "root", size 37 MiB)
[ 18.307691] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 18.315003] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[ 18.322155] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 18.329167] ubi0: good PEBs: 297, bad PEBs: 0, corrupted PEBs: 0
[ 18.335789] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[ 18.343409] ubi0: max/mean erase counter: 6/4, WL threshold: 4096, image sequence number: 30621
[ 18.352460] ubi0: available PEBs: 0, total reserved PEBs: 297, PEBs reserved for bad PEB handling: 40
[ 18.361937] ubi0: background thread "ubi_bgt0d" started, PID 411
That means the BBT reading is the issue don't you think ?
Now if I keep NAND_BBT_CREATE but remove NAND_BBT_WRITE same thing, it works as
well. That leaves only the re-enabling of the BBT write, which I'll do as soon
as you tell me my NAND won't be damaged.
Cheers.
--
Robert
next prev parent reply other threads:[~2018-01-12 20:44 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 10:36 [PATCH v3 0/7] Marvell NAND controller rework with ->exec_op() Miquel Raynal
2018-01-09 10:36 ` [PATCH v3 1/7] dt-bindings: mtd: document new nand-rb property Miquel Raynal
2018-01-11 22:23 ` Rob Herring
2018-01-09 10:36 ` [PATCH v3 2/7] dt-bindings: mtd: add Marvell NAND controller documentation Miquel Raynal
2018-01-11 22:25 ` Rob Herring
2018-01-09 10:36 ` [PATCH v3 3/7] mtd: nand: add reworked Marvell NAND controller driver Miquel Raynal
2018-01-09 10:36 ` [PATCH v3 4/7] mtd: nand: use reworked NAND controller driver with Marvell EBU SoCs Miquel Raynal
2018-01-09 10:36 ` [PATCH v3 5/7] mtd: nand: use Marvell reworked NAND controller driver with all platforms Miquel Raynal
2018-02-12 10:20 ` Boris Brezillon
2018-01-09 10:36 ` [PATCH v3 6/7] dt-bindings: mtd: remove pxa3xx NAND controller documentation Miquel Raynal
2018-01-09 10:36 ` [PATCH v3 7/7] mtd: nand: remove useless fields from pxa3xx NAND platform data Miquel Raynal
2018-02-12 10:17 ` Miquel Raynal
2018-02-17 9:43 ` Robert Jarzmik
2018-01-11 11:27 ` [PATCH v3 0/7] Marvell NAND controller rework with ->exec_op() Boris Brezillon
2018-01-11 17:42 ` Robert Jarzmik
2018-01-11 22:24 ` Miquel RAYNAL
2018-01-12 8:09 ` Robert Jarzmik
2018-01-12 8:45 ` Boris Brezillon
2018-01-12 9:01 ` Miquel Raynal
2018-01-12 9:34 ` Robert Jarzmik
2018-01-12 9:52 ` Boris Brezillon
2018-01-12 20:44 ` Robert Jarzmik [this message]
2018-01-13 8:38 ` Boris Brezillon
2018-01-13 11:05 ` Miquel Raynal
2018-01-14 10:35 ` Robert Jarzmik
2018-01-22 8:51 ` Boris Brezillon
2018-01-27 10:33 ` Robert Jarzmik
2018-01-29 10:36 ` Boris Brezillon
2018-01-12 10:21 ` Boris Brezillon
2018-01-12 16:43 ` Robert Jarzmik
2018-01-13 8:38 ` Boris Brezillon
2018-01-14 10:20 ` Robert Jarzmik
2018-01-22 8:54 ` Boris Brezillon
2018-01-11 22:28 ` Willy Tarreau
2018-01-12 18:21 ` Miquel Raynal
2018-01-12 15:55 ` Boris Brezillon
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=87wp0majtg.fsf@belgarion.home \
--to=robert.jarzmik@free.fr \
--cc=boris.brezillon@free-electrons.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@free-electrons.com \
/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