[PATCH] NAND: fix reading/writing OOB for syndrome
Vitaly Wool
vwool at ru.mvista.com
Tue Jun 13 11:56:33 EDT 2006
On Tue, 13 Jun 2006 17:52:53 +0200
Thomas Gleixner <tglx at linutronix.de> wrote:
> 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.
Hmm, agreed. Not a big thing to change though.
> > 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 !
Not it's not that dramatic. :)
After some speculation, I do agree that handling prepad and postpad there is necessary.
Vitaly
More information about the linux-mtd
mailing list