[PATCH v2] mtd: nand: Add driver for M-sys / Sandisk diskonchip G4

Artem Bityutskiy dedekind1 at gmail.com
Tue Nov 8 16:12:28 EST 2011


On Thu, 2011-11-03 at 12:59 +0100, Ivan Djelic wrote:
> On Thu, Nov 03, 2011 at 11:02:11AM +0000, Robert Jarzmik wrote:
> > > I can see two cleaner alternatives to solve this issue:
> > >
> > > 1. When you program a page, before writing hwecc to oob, adjust it like this:
> > > 2. Use unprotected spare oob byte 15 as a programmming marker: remove it from
> > > ...zip...
> > 
> > I would see a third one:
> > 3. After reading the page, check bit DOC_ECCCONF1_PAGE_IS_WRITTEN in DOC_ECCCONF1 register.
> >    I think this bit is calculated from the Hamming Code (not sure), but I'm pretty sure that
> >    this bit is 0 when the page is blank, and 1 if the page was written before.
> > 
> 
> OK, that's even simpler.
> But as Matthieu pointed out, you would still need to clean-up bitflips in blank
> pages for UBIFS...

What happens is UBIFS writes to a blank page which already contains more
bitflips than ECC can handle? I presume UBI would get a write error? If
UBI gets an EIO on write, than it should move all the data to a
different PEB and schedule the bit-flippy eraseblock for torturing. Just
worth checking that the driver indeed returns an error in this case.

Artem.





More information about the linux-mtd mailing list