[PATCH] NAND: fix reading/writing OOB for syndrome
Thomas Gleixner
tglx at linutronix.de
Tue Jun 13 11:52:53 EDT 2006
On Tue, 2006-06-13 at 19:48 +0400, Vitaly Wool wrote:
> On Tue, 13 Jun 2006 17:34:55 +0200
> Thomas Gleixner <tglx at linutronix.de> wrote:
>
> > ???? You want to read in the data area of the FLASH !
>
> No, it becomes a requirement to the NAND chip driver to convert NAND_CMD_READOOB to what's appropriate for the chip.
> If we require the chip driver to be able to convert NAND_CMD_READOOB with offset 0, why not require it to convert it properly for other offsets?
Thats completely bogus. We will put such crap into the command
functions. Command functions handle raw flash commands and nothing else.
The fixup for NAND_CMD_READOOB is just a conveniance to keep small and
large page compatible.
> > > + chip->cmdfunc(mtd, NAND_CMD_READOOB, (i + 1) * portion, page);
> >
> > CMD_READOOB is simply wrong
> >
> > Also it ignores the prepad and postpad parts.
>
> See above.
> I read all the OOB by portions for the (data, oob+ecc) x eccsteps layout.
> I don't distinguish between spare OOB and ECC so I don't need to take prepad/postpad into account.
> We'll just need another couple of funcs for syndromes that imply ( (data, ecc) x eccsteps, oob) layout.
Ah, and we need to make both command functions aware of that crap ? Only
over my dead body !
tglx
More information about the linux-mtd
mailing list