From: Thomas Gleixner <tglx@linutronix.de>
To: Steve Finney <saf76@earthlink.net>
Cc: linux-mtd@lists.infradead.org
Subject: Re: NAND OOB Questions...
Date: Mon, 05 Jun 2006 10:14:24 +0200 [thread overview]
Message-ID: <1149495264.11983.12.camel@localhost.localdomain> (raw)
In-Reply-To: <32905508.1149179928067.JavaMail.root@elwamui-karabash.atl.sa.earthlink.net>
On Thu, 2006-06-01 at 09:38 -0700, Steve Finney wrote:
> 1) The Samsung K9F56* NAND chip allows doing more than one write
> to the OOB area of a page without an erase; the second write
> may zero bits that were set to 1 by the first write. Is the Samsung
Bits can not be set to 1 by the first write. FLASH cells are set to 1 by
erasing and programming can set bits to 0.
> chip unusual in this, or is this normal NAND behavior? (I believe
> this would be normal for NOR flash).
On NOR you can do this almost unlimited. NAND is much more restricted
vs. write ordering.
> 2) In nand_base.c:nand_write_page(), OOB data is written even when
> NAND_ECC_NONE is set. Under what circumstances is this useful?
> (The issue with this is that, in conjunction with (1), this may
> overwrite OOB in a circumstance where you're trying to write it
> yourself from user space; pernaps this is something that's only relevant
> for diagnostics/debugging).
The buffer is usually 0xff except when a caller provides content.
> 3) nand_prepare_oobbuf() makes a point of setting the internal oobbuf
> to 0xFF if it's had ECC bytes written to it (based on the this->oobdirty
> flag). However, the default case (which includes hardware ECC) in
> nand_write_page() can write the internal oobbuf without setting
> this->oobdirty, and thus not triggering the later reset to 0xFF. Is
> there a rationale for this? (The OOB issue induced by 1 & 2 would be
> benign if oobbuf was cleared to 0xFF).
Well, if you use ECC then ECC is always at the same offset in the buffer
so there is no point in setting it back to 0xff all them time.
Please be aware that the NAND driver has been refactored and some of the
algorithms have been changed.
See: http://git.infradead.org/?p=mtd-2.6.git;a=summary
These changes will hit mainline in the 2.6.18 merge window.
tglx
next prev parent reply other threads:[~2006-06-05 8:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-01 16:38 NAND OOB Questions Steve Finney
2006-06-05 8:14 ` Thomas Gleixner [this message]
2006-06-05 9:23 ` Charles Manning
[not found] <21148625.1149520632350.JavaMail.root@elwamui-karabash.atl.sa.earthlink.net>
2006-06-06 5:38 ` Thomas Gleixner
[not found] <15200571.1149603155027.JavaMail.root@elwamui-darkeyed.atl.sa.earthlink.net>
2006-06-06 15:03 ` Thomas Gleixner
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=1149495264.11983.12.camel@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=linux-mtd@lists.infradead.org \
--cc=saf76@earthlink.net \
/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