Author: Jacob Dall Date: To: yaffs Subject: [Yaffs] Bad block management
Hello yaffers,
I've a few questions regarding why yaffs' bad block management is designed the way it is.
According to Toshiba, NAND failures can be distinguished as "permanent failures" or "soft errors"
1) Permanent failures: this error occurs when programming or erasing, and can be detected by reading the status register after operation.
2) Soft errors: this error occurs during a program, but can only be detected by reads. The error is cleared by a block erase.
Now, upon read, if yaffs detects an unfixable ECC error in a page, the block holding that page is marked as bad.
According to 2) it would be ok to just mark the page as discarded and let the garbage collector do its job - or have I missed something?
In yaffs, a block is marked bad by writing 0 to byte 517 in page 0 / 1 in the block. Why wasn't it decided to use another value (for instance, like SmartMedia's 0xF0). Then it would have been possible to destinguish initial bad blocks from operational bad blocks.
I've an issue with some of my devices - bad blocks is increased very rapidly. Beyond the fact that it's due to ECC read errors, I'm yet to discover the root of the problem.
I'm not blaming yaffs - I'm sure the problem is to be found else where, but I'm thinking really hard of making those changes to yaffs, making me able to get back to the state when the NAND was first taken into use.
Please let me know your reasons / thoughts...
Thanks and regards,
Jacob Dall
FYI: the 'According to Toshiba' stuff was taken from a document named 'NAND Flash Application Design Guide'