Brad, Actually, the blockStatus is NOT covered by the spares ECC. The 16 "spare" bytes for each page include 6 bytes of ECC on the 512 data bytes, the page status byte, the block status byte, and eight bytes of spares, with their own internal ECC. The block and page status bytes are the only two bytes not involved in ECC in any way. FWIW, I've noticed that the ECC codes used by YAFFS (and SmartMedia, etc.) are neither particularly strong nor efficient in their use of bits. In a message one week ago, "J.D. Bakker" said he (she?) knew his way around error correcting codes. Perhaps could we get someone to look into a code that detects more multi-bit errors or a smaller code that frees up some more of the spares bytes for use by YAFFS2. I'm not an ECC expert, so perhaps someone could explain the benefit of the current ECC. It looks like it uses 6 bytes to cover the 512 data bytes where 3 would suffice. Maybe SmartMedia did that as a legacy from code to handle old parts with only 256 data bytes per page (2 MByte parts), but YAFFS aims for larger parts than those. Mind, investigating the ECC doesn't help support large NAND arrays, or support parallel operation on multiple NAND chips. (J.D. Bakker mentioned those as goals.) The latter would take some fairly serious work on yaffs_guts. It would break one core assumption that each NAND operation completes or fails before another starts. Regards, William -----Original Message----- From: Brad Beveridge [mailto:Brad.Beveridge@trimble.co.nz] Sent: Tuesday, June 10, 2003 8:01 PM To: yaffs@toby-churchill.org Subject: RE: Block Status Question I think it is because ECC can correct a 1 bit error. The yaffs_isBlockBad function doesn't bother to do ECC so it is possible that there is a 1 bit error in the block status byte. Counting the bits < 7 implies that 2 bits are bad & there is no chance that ECC will fix it. Side note - if what I say is correct, perhaps the tags should be ECC fixed (if bits < 8) & then checked against 0xFF, otherwise it would be possible for the block status byte to have a single bit error, but also other bytes of the tag to have errors - which would also invalidate the ECC check? Ie, if (countBits < 7) return 1; else if (countBits != 0xFF) { ecc_correct_tags if (corrected_status != 0xFF) } Cheers Brad > -----Original Message----- > From: Jim Muchow [mailto:james.muchow@qlogic.com] > Sent: Wednesday, 11 June 2003 4:20 a.m. > To: yaffs@toby-churchill.org > Subject: Block Status Question > > > In yaffs_IsBlockBad() a test is made for the number of bits > in each byte. The original test for 0xFF is #if'd out. > > The test for failure is less than 7. Shouldn't this be 8? > What am I missing? > > JM > > > -------------------------------------------------------------- > ------------------------- > 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. --------------------------------------------------------------------------------------- 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.