[PATCH] mtd: nand: Add support for Micron on-die ECC controller (rev2).
David Mosberger
davidm at egauge.net
Fri Mar 28 11:52:37 EDT 2014
On Thu, Mar 27, 2014 at 12:56 AM, Gupta, Pekon <pekon at ti.com> wrote:
>>+ set_on_die_ecc(mtd, chip, 1);
>>+
>>+ chkoob = chkbuf + mtd->writesize;
>>+ rawoob = rawbuf + mtd->writesize;
>>+ eccpos = chip->ecc.layout->eccpos;
>>+ for (i = 0; i < chip->ecc.steps; ++i) {
>>+ /* Count bit flips in the actual data area: */
>>+ flips = bitdiff(chkbuf, rawbuf, chip->ecc.size);
>>+ /* Count bit flips in the ECC bytes: */
>>+ for (j = 0; j < chip->ecc.bytes; ++j) {
>
> You should check bit-flips in complete OOB region (mtd->oobsize) not just ecc.bytes.
I was under the impression that OOB data bytes cannot be assumed to be
ECC protected.
As it happens, when using Internal ECC on those Micron chips, *some*
of the OOB databytes
are ECC protected, but I didn't think it was necessary to count those
for bitflips, since OOB users
won't assume ECC protection anyhow. Am I wrong about that?
--david
--
eGauge Systems LLC, http://egauge.net/, 1.877-EGAUGE1, fax 720.545.9768
More information about the linux-mtd
mailing list