From: Vitaly Wool <vwool@ru.mvista.com>
To: tglx@linutronix.de
Cc: linux-mtd@lists.infradead.org
Subject: Re: NAND/ HW ECC problem
Date: Tue, 20 Sep 2005 01:40:39 +0400 [thread overview]
Message-ID: <432F3057.4080600@ru.mvista.com> (raw)
In-Reply-To: <1127162439.24044.235.camel@tglx.tec.linutronix.de>
Thomas Gleixner wrote:
>On Mon, 2005-09-19 at 17:40 +0400, Vitaly Wool wrote:
>
>
>>First, it turned to be necessary to add one more ECC type
>>(NAND_ECC_HW10_512): this controller stores 10 ECC data bytes after each
>>512-byte block. Also the need to change size of eccpos array off of
>>nand_oobinfo structure arose: for flashes with 2K-sector, this turned to
>>be 40 bytes for each sector.
>>
>>
>
>Hmm, we really should think about making the ECC size per chunksize run
>time configurable.
>
>
What if have it in the same way as oobfree is stored, i. e. {offset,
length} pairs instead?
>
>
>>The serious problem we came across also was that nand_write_page doesn't
>>follow the free bytes reference for OOB to write ECC data what was
>>obviously wrong. As far as I understand, the DoC flashes have specific
>>mechanism for handling that, so he legacy variant was left for the DoC,
>>dunno whether it's right.
>>
>>
>
>Err, the oobfree reference is the place where file systems can put their
>data in. The ECC is put into the byte positions given by eccpos.
>
>
>
Oh yes, thanks for the clarifications.
>I never bothered to implement the support for HW_ECC with a scattered
>byte layout as I never seen a controller doing such nonsense. All I have
>seen do
>
>data - ecc - fsoobdata (512byte/page)
>data - ecc -data - ecc -data - ecc -data - ecc - fsoobdata (2k/page)
>
>as this is the most efficient way to handle it.
>
>If your chip does it different, please use the correct parts of the data
>structure to implement it.
>
>
>
Yes, it does and I'm not at all happy with that. However, I guess this
controller is likely to be used in other boards' designs...
So, the right way to handle this bizarre stuff currently is to
write/read ECC data byte-by-byte following the eccpos array, correct?
Best regards,
Vitaly
next prev parent reply other threads:[~2005-09-19 21:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-19 13:40 NAND/ HW ECC problem Vitaly Wool
2005-09-19 20:40 ` Thomas Gleixner
2005-09-19 21:40 ` Vitaly Wool [this message]
2005-09-19 21:43 ` Thomas Gleixner
2005-09-20 9:19 ` Vitaly Wool
2005-09-20 10:04 ` 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=432F3057.4080600@ru.mvista.com \
--to=vwool@ru.mvista.com \
--cc=linux-mtd@lists.infradead.org \
--cc=tglx@linutronix.de \
/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