From: Mike Dunn <mikedunn@newsguy.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org,
Shmulik Ladkani <shmulik.ladkani@gmail.com>,
dedekind1@gmail.com
Subject: Re: [PATCH] mtd: nand: ignore ecc errors during bbt reads
Date: Tue, 12 Jun 2012 06:23:29 -0700 [thread overview]
Message-ID: <4FD742D1.2080501@newsguy.com> (raw)
In-Reply-To: <CAN8TOE_JVZYnVqAL=63ErnUHxdREjQw6EMZNNTm6h=jeyG9=6A@mail.gmail.com>
On 06/10/2012 10:45 PM, Brian Norris wrote:
>
> On Sun, Jun 10, 2012 at 4:50 AM, Shmulik Ladkani
> <shmulik.ladkani@gmail.com> wrote:
>> On Thu, 7 Jun 2012 11:32:08 -0700 Mike Dunn <mikedunn@newsguy.com> wrote:
>>> Ignore ecc errors in the scan_read_raw_oob() function. Also removed code that
>>> is now redundant.
>>>
>>> Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
>>> ---
>>> drivers/mtd/nand/nand_bbt.c | 6 +++---
>>> 1 files changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
>>> index 30d1319..585da44 100644
>>> --- a/drivers/mtd/nand/nand_bbt.c
>>> +++ b/drivers/mtd/nand/nand_bbt.c
>>> @@ -319,7 +319,8 @@ static int scan_read_raw_oob(struct mtd_info *mtd, uint8_t *buf, loff_t offs,
>>>
>>> res = mtd_read_oob(mtd, offs, &ops);
>>>
>>> - if (res)
>>> + /* Ignore ECC errors when checking for BBM */
>>> + if (res && !mtd_is_bitflip_or_eccerr(res))
>>> return res;
>>
>> IMO this is not necessary.
>> Note the 'ops.mode' is initialized to MTD_OPS_RAW; meaning, no ECC is
>> performed during read ('ecc.read_page_raw' will be invoked).
>> Thus, EUCLEAN/EBADMSG should not be reported.
>> Am I missing something here?
>
> Shmulik is correct. A check for bitflips on a MTD_OPS_RAW operation is
> unnecessary.
Yes, I missed the ops mode raw. Obviously my analysis was wrong.
Good that nand_bbt is getting cleaned up some.
Thanks again Brian and Shmulik.
Mike
prev parent reply other threads:[~2012-06-12 13:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 18:32 [PATCH] mtd: nand: ignore ecc errors during bbt reads Mike Dunn
2012-06-10 11:50 ` Shmulik Ladkani
2012-06-11 5:45 ` Brian Norris
2012-06-11 6:41 ` Shmulik Ladkani
2012-06-11 6:53 ` Brian Norris
2012-06-12 10:37 ` Artem Bityutskiy
2012-06-12 13:23 ` Mike Dunn [this message]
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=4FD742D1.2080501@newsguy.com \
--to=mikedunn@newsguy.com \
--cc=computersforpeace@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=shmulik.ladkani@gmail.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