From: Angus CLARK <angus.clark@st.com>
To: linux-mtd@lists.infradead.org
Cc: ivan.djelic@parrot.com,
Brian Norris <computersforpeace@gmail.com>,
matthieu.castet@parrot.com
Subject: Re: [PATCH 1/8] mtd: nand: remove NAND_BBT_SCANBYTE1AND6 option
Date: Wed, 12 Oct 2011 10:49:45 +0100 [thread overview]
Message-ID: <4E9562B9.3000907@st.com> (raw)
In-Reply-To: <mailman.2004.1310142982.20023.linux-mtd@lists.infradead.org>
Hi Brian,
On Tue, 31 May 2011 16:31:20 -0700, Brian Norris
<computersforpeace@gmail.com> wrote:
> This patch reverts most of:
> commit 58373ff0afff4cc8ac40608872995f4d87eb72ec
> mtd: nand: more BB Detection refactoring and dynamic scan options
>
> According to the discussion at:
> http://lists.infradead.org/pipermail/linux-mtd/2011-May/035696.html
> the NAND_BBT_SCANBYTE1AND6 flag, although technically valid, can break
> some existing ECC layouts that use the 6th byte in the OOB for ECC data.
> Furthermore, we apparently do not need to scan both bytes 1 and 6 in
> the OOB region of the devices under consideration; instead, we only need
> to scan one or the other.
>
> Thus, the NAND_BBT_SCANBYTE1AND6 flag is at best unnecessary and at
> worst a regression.
>
Sorry to bring this up again, but I just thought you might be interested
in the following clarification I received from Micron (who now own the
ST/Numonyx NAND portfolio):
---
"In the factory, we mark bad blocks by programming (in the spare area of
the first page of the block) SPARE[0] = 00h and SPARE[5] = 00h. On x16
devices we program SPARE[0] = 0000h.
Due to the fact that the block is bad, it may be impossible to program
some of the bits. The most reliable test for a bad block is therefore:
x8 device: (SPARE[0] != FFh) OR (SPARE[5] != FFh)
x16 device: (SPARE[0] != FFFFh)
Having said that, it is very unlikely that all 8 bits of a location will
be stuck at '1', so if you just want to test SPARE[0] OR SPARE[5], that
should be reliable enough for most applications."
---
So, I believe this confirms your original interpretation of the
ST/Numonyx datasheets and that the NAND_BBT_SCANBYTE1AND6 is valid. The
question still remains what to do with this information, in view of the
potential clash with existing ECC layouts (including the default S/W ECC
layout). A couple of options you proposed previously:
1) Retain the NAND_BBT_SCANBYTE1AND6 flag, and add some code to mask out
the flag if necessary based on the ECC layout (possibly in
nand_scan_tail()?).
2) Revert the flag, as done in this patch, and accept the very small
possibility of missing some factory-marked bad-blocks.
My preference would be 1), since it is technically correct, and would
allow drivers to make use of the information if possible, while avoiding
regressions associated with ECC layout clashes.
I appreciate the patch for 2) has already made it to l2-mtd2.6 so it may
be too late anyway...
Cheers,
Angus
next parent reply other threads:[~2011-10-12 9:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2004.1310142982.20023.linux-mtd@lists.infradead.org>
2011-10-12 9:49 ` Angus CLARK [this message]
2011-10-19 19:25 ` [PATCH 1/8] mtd: nand: remove NAND_BBT_SCANBYTE1AND6 option Brian Norris
2011-05-31 23:31 [PATCH 0/8] clean-up NAND / BBT code, flags Brian Norris
2011-05-31 23:31 ` [PATCH 1/8] mtd: nand: remove NAND_BBT_SCANBYTE1AND6 option Brian Norris
2011-07-08 16:35 ` Brian Norris
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=4E9562B9.3000907@st.com \
--to=angus.clark@st.com \
--cc=computersforpeace@gmail.com \
--cc=ivan.djelic@parrot.com \
--cc=linux-mtd@lists.infradead.org \
--cc=matthieu.castet@parrot.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 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.