From: Brian Norris <computersforpeace@gmail.com>
To: Yanjiantao <yanjiantao@hisilicon.com>
Cc: "dmw2@infradead.org" <dmw2@infradead.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Caizhiyong <caizhiyong@hisilicon.com>,
pengjiancheng <pengjiancheng@huawei.com>
Subject: Re: 答复: [PATCH] mtd: cmdlinepart: allow fill-up partition at any point
Date: Tue, 13 Oct 2015 10:51:36 -0700 [thread overview]
Message-ID: <20151013175136.GX107187@google.com> (raw)
In-Reply-To: <A5C805F07496A54EAFF48B92DEC9C1057AECB167@SZXEMA501-MBX.china.huawei.com>
Hi,
First of all, I don't know why this message is in reply to the $subject
thread. Bad block markers have nothing to do with cmdlineparts.
On Tue, Oct 13, 2015 at 08:53:04AM +0000, Yanjiantao wrote:
> Hi,
> In linux-3.10 and later kernel versions, block 'markbad' or 'checkbad' method is to mark or check 1st, 2nd/last page, which depends on chip->bbt_options:
> markbad flows is as follows:
> /* Write to first/last page(s) if necessary */
> if (chip->bbt_options & NAND_BBT_SCANLASTPAGE)
> wr_ofs += mtd->erasesize - mtd->writesize;
> do {
> res = nand_do_write_oob(mtd, wr_ofs, &ops);
> if (!ret)
> ret = res;
>
> i++;
> wr_ofs += mtd->writesize;
> } while ((chip->bbt_options & NAND_BBT_SCAN2NDPAGE) && i < 2);
> Check bad flows is the same.
>
> 1. when NAND_BBT_SCANLASTPAGE is set, markbad and checkbad on the last page only.
> 2. when NAND_BBT_SCAN2NDPAGE is set, markbad and checkbad on the 1st and 2nd page.
Sounds right.
> Questions:
> 1. for some NAND Flash, badblock marker is on 1st or 2nd or last page(spansion), in this case , check badblock my fail.
> 2. for some NAND Flash, bad block marker is on 1st or last page(hynix H27UBG8T2CTR) , in this case, check badblock may fail too.
> 3. set NAND_BBT_SCANLASTPAGE means only mark or check the last page, which is not compliant with SAMSUNG/ TOSHIBA/ HYNIX/MICRON/spansion. they claim bad block marker is on 1st/2nd, or 1st/last, or 1st/2nd/last, or the 1st only.
We try our best to get the BBM locations correct. But we have
acknowledged that there are corner cases out there that we don't get
right. So far, I guess nobody really cares.
FWIW, in practice it seems that even when the datasheet says something
specific like the descriptions you mention above, the factory process
just fuses all bytes to zero (not just OOB, and not just in certain
pages; but ALL bytes in the factory-marked bad block). Have you seen any
failures as a result of bad BBM scans? Or is the problem just
theoretical?
Also, you can refer to this (old) table of NAND flash [1] that I and a few
others catalogued, and it notes a few flash that are not supported
correctly. It may be a bit out of date.
Brian
[1] http://linux-mtd.infradead.org/nand-data/nanddata.html
next prev parent reply other threads:[~2015-10-13 17:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <C3050A4DBA34F345975765E43127F10F62D61353@SZXEMA512-MBX.china.huawei.com>
2015-10-13 8:53 ` 答复: [PATCH] mtd: cmdlinepart: allow fill-up partition at any point Yanjiantao
2015-10-13 17:51 ` Brian Norris [this message]
2015-10-14 2:48 ` 答复: " Yanjiantao
2015-10-17 9:02 ` Sheng Yong
2015-10-13 11:33 ` questions about [PATCH]mtd: nand: fix SCAN2NDPAGE check for BBM Yanjiantao
2015-10-13 17:53 ` 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=20151013175136.GX107187@google.com \
--to=computersforpeace@gmail.com \
--cc=caizhiyong@hisilicon.com \
--cc=dmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=pengjiancheng@huawei.com \
--cc=yanjiantao@hisilicon.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;
as well as URLs for NNTP newsgroup(s).