From: shijie8@gmail.com (Huang Shijie)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mtd: nand: gpmi: add proper raw access support
Date: Wed, 17 Sep 2014 23:26:11 +0800 [thread overview]
Message-ID: <20140917152609.GA2111@localhost.localdomain> (raw)
In-Reply-To: <20140915221210.5d9871fb@bbrezillon>
On Mon, Sep 15, 2014 at 10:12:10PM +0200, Boris BREZILLON wrote:
> On Mon, 15 Sep 2014 22:43:02 +0800
> Huang Shijie <shijie8@gmail.com> wrote:
>
> > On Sat, Sep 13, 2014 at 10:38:41AM -0700, Brian Norris wrote:
> > > On Sat, Sep 13, 2014 at 11:36:24PM +0800, Huang Shijie wrote:
> > > > On Fri, Sep 12, 2014 at 02:30:50PM +0200, Boris BREZILLON wrote:
> > > > > This test validates what's returned by ecc_strength file in sysfs
> > > > > (which in turn is specified by the NAND controller when initializing
> > > > > the NAND chip).
> > > > >
> > > > > Doing this should not imply knowing the ECC algorithm in use in the
> > > > > NAND controller or the layout used to store data on NAND.
> > > > the difficulty is that the ECC parity area can be not byte aligned.
> > >
> > > Is there a problem with just rounding up to the nearest byte alignment
> > > and ignoring the few bits that are wasted?
> >
> > I feel a little confused with the two hooks.
> >
> > does the ecc->write_page_raw need to write the ECC parity data?
>
> Depending on the oob_required argument, it might be allowed to
> overwrite the ECC bytes even if this implies breaking page reliability
> (which is exactly what's expected).
>
> When using raw write with with oob write option the writer should take
> care of regenerating ECC bytes (which you said was impossible in GPMI
> case) or copying them from a previous raw read.
Thanks for the explanation.
If we do not write the OOB, should we write the ECC bytes?
The hooks should comment clearly about how to implement them :(
>
> Here is a real example of what one could test with raw write + oob:
> 1) read a page in raw mode
> 2) flip some bits in the generated ECC bytes (or what you references as
> parity data) (this case can actually happen in real life)
> 3) write the modified page in raw mode
> 4) read back the same page in normal and check that ECC correction still
> works as expected
the nandbiterr test mode does the test as above.
But i think the multi-writes to the same page should occur only for the
SLC nand.
I will read your new patch set carefully in this weekend.
thanks
Huang Shijie
next prev parent reply other threads:[~2014-09-17 15:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 8:55 [PATCH] mtd: nand: gpmi: add proper raw access support Boris BREZILLON
2014-09-11 12:09 ` Huang Shijie
2014-09-11 12:36 ` Boris BREZILLON
2014-09-11 14:25 ` Huang Shijie
2014-09-11 14:38 ` Boris BREZILLON
2014-09-12 0:45 ` Huang Shijie
2014-09-12 12:30 ` Boris BREZILLON
2014-09-13 15:36 ` Huang Shijie
2014-09-13 17:38 ` Brian Norris
2014-09-14 14:07 ` Boris BREZILLON
2014-09-15 14:43 ` Huang Shijie
2014-09-15 20:12 ` Boris BREZILLON
2014-09-17 15:26 ` Huang Shijie [this message]
2014-09-17 18:16 ` Boris BREZILLON
2014-09-29 1:22 ` Iwo Mergler
2014-09-30 8:04 ` Boris Brezillon
2014-10-02 6:52 ` Iwo Mergler
2014-09-11 14:29 ` Huang Shijie
2014-09-11 14:45 ` Boris BREZILLON
2014-09-12 0:40 ` Huang Shijie
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=20140917152609.GA2111@localhost.localdomain \
--to=shijie8@gmail.com \
--cc=linux-arm-kernel@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).