From: Brian Norris <computersforpeace@gmail.com>
To: Kamal Dasu <kamal.dasu@broadcom.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
Kamal Dasu <kdasu.kdev@gmail.com>,
linux-mtd@lists.infradead.org,
Florian Fainelli <f.fainelli@gmail.com>,
bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH 1/2] mtd: brcmnand: Add check for erased page bitflips
Date: Wed, 1 Jun 2016 10:14:40 -0700 [thread overview]
Message-ID: <20160601171440.GA30704@google.com> (raw)
In-Reply-To: <CAKekbesoPajRAE1d=df1bWM=YF2MmMnC8-UHEmEkYuV1y+PFhg@mail.gmail.com>
On Wed, Jun 01, 2016 at 12:46:18PM -0400, Kamal Dasu wrote:
> On Mon, May 30, 2016 at 4:42 AM, Boris Brezillon
> <boris.brezillon@free-electrons.com> wrote:
> > On Fri, 29 Apr 2016 16:21:24 -0400
> > Kamal Dasu <kdasu.kdev@gmail.com> wrote:
> >> + if (ret)
> >> + return ret;
> >> +
> >> + for (i = 0; i < chip->ecc.steps; i++, oob += sas) {
> >> + unsigned int bitflips = 0;
> >> +
> >> + bitflips += oob_nbits - bitmap_weight(oob, oob_nbits);
> >> + bitflips += data_nbits - bitmap_weight(buf, data_nbits);
> >> +
> >> + buf += chip->ecc.size;
> >> + addr += chip->ecc.size;
> >
> > You seem to duplicate nand_check_erased_ecc_chunk() here. Do you have a
> > good reason for doing that?
> >
>
> Hmmm I see what you are saying. Let me try setting the
> NAND_ECC_GENERIC_ERASED_CHECK option and see if we can get away
> without having to read raw. I will have to test and make sure on
> uncorrectable error the hw leaves the return page data buffers and oob
> buffers in raw state.
I'm quite sure you can't make use of NAND_ECC_GENERIC_ERASED_CHECK
unless you do a substantial rewrite; brcmnand doesn't use any of the
nand_base ecc.read_{page,subpage} callbacks.
> If that works as expected I will get rid of this duplication and send
> a revised change which shall make use of the
> NAND_ECC_GENERIC_ERASED_CHECK option.
I suspect he was just suggesting calling the
nand_check_erased_ecc_chunk() helper instead of doing your own
bitmap_weight() calls.
Brian
next prev parent reply other threads:[~2016-06-01 17:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 20:21 [PATCH 1/2] mtd: brcmnand: Add check for erased page bitflips Kamal Dasu
2016-04-29 20:21 ` [PATCH 2/2] mtd: brcmnand: Detect sticky ucorr ecc error on dma reads Kamal Dasu
2016-05-30 8:50 ` Boris Brezillon
2016-06-01 16:50 ` Kamal Dasu
2016-06-01 17:20 ` Boris Brezillon
2016-06-01 20:37 ` Boris Brezillon
2016-06-02 18:55 ` Kamal Dasu
2016-05-30 8:42 ` [PATCH 1/2] mtd: brcmnand: Add check for erased page bitflips Boris Brezillon
2016-06-01 16:46 ` Kamal Dasu
2016-06-01 17:14 ` Brian Norris [this message]
2016-06-01 17:22 ` Boris Brezillon
2016-06-01 17:27 ` Kamal Dasu
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=20160601171440.GA30704@google.com \
--to=computersforpeace@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=boris.brezillon@free-electrons.com \
--cc=f.fainelli@gmail.com \
--cc=kamal.dasu@broadcom.com \
--cc=kdasu.kdev@gmail.com \
--cc=linux-mtd@lists.infradead.org \
/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).