Nick Thanx for pointing these out. I will fix them ASAP. The impact is only on those people using Linux with NANDECC and is benign to WinCE and YAFFS direct. -- Charles On Fri, 28 Feb 2003 05:31, Nick Bane wrote: > Charles > > A couple of bugs. One serious, one minor. > > in yaffs_ReadChunkFromNAND when dev->useNANDECC is true, it is assumed that > readChunkFromNAND fills in the two ecc result integers on the end of the > oob data. > These are then tested to see if there has been and ecc read fail/correction > by the mtd layer. > > The problem with this is that readChunkFromNAND never actually passes the > ecc correction data back but leaves it in a local variable tmpSpare and > only copies YAFFS_BYTES_PER_SPARE from it. > > The serious consequence of this is that all chunk reads are then flagged as > failures and their blocks are marked as needing retiring once the data is > erased so yaffs nand becomes effectively write-once. The really serious > consequence of this is that one cannot now distinguish between > yaffs_retired_blocks and nand_factory_bad_blocks so one has to > speculatively erase the entire device losing the factory erase data (which > seems to be zero on devices I have seen). Shouldn't we use a value other > than 0 for yaffs to mark the block as bad (with more than two zero bits) so > they can be distinguished? > > The other bug is in testing the ecc correction results in > yaffs_ReadChunkFromNAND. > if(nspare.eccres2 || nspare.eccres2) > Clearly one of them should be eccres1 > > Nick > > ------------------------------------------- > Nick Bane > Cambridge, UK. > +44(0)1954 719270 > > > > > --------------------------------------------------------------------------- >------------ This mailing list is hosted by Toby Churchill open software > (www.toby-churchill.org). If mailing list membership is no longer wanted > you can remove yourself from the list by sending an email to > yaffs-request@toby-churchill.org with the text "unsubscribe" (without the > quotes) as the subject. --------------------------------------------------------------------------------------- This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org). If mailing list membership is no longer wanted you can remove yourself from the list by sending an email to yaffs-request@toby-churchill.org with the text "unsubscribe" (without the quotes) as the subject.