This issue has been discussed a few times and raises some interesting issues.

Yes, some flash parts say to consider bit flips as not bad - just refresh - but the other side to this is that if blocks experience MANY bit flips they are maybe going bad and we want to catch the problem before data is lost.

It might be time to introduce a third level of error. ie something like:

* NO_ERROR : No problems.
* REFRESH_NEEDED: (new) Refresh block, don't worry about it going bad.
* FIXED_BUT_SUSPECT: Treated same as FIXED is now, retire the block if it does this again.
* UNFIXED

-- Charles



On Thu, May 8, 2014 at 5:30 PM, Qi Wang 王起 (qiwang) <qiwang@micron.com> wrote:
Hi,
I see some bad block definition issue in YAFFS2.
In the YAFFS2 read function, when a page occur bit flip more 3 times, the block contain this page will be marked as bad block. as below read function:
int yaffs_rd_chunk_tags_nand(struct yaffs_dev *dev, int nand_chunk,
                             u8 *buffer, struct yaffs_ext_tags *tags)
{
                int result;
                struct yaffs_ext_tags local_tags;
                int flash_chunk = apply_chunk_offset(dev, nand_chunk);
 
                dev->n_page_reads++;
 
                /* If there are no tags provided use local tags. */
                if (!tags)
                        tags = &local_tags;
 
                result = dev->tagger.read_chunk_tags_fn(dev, flash_chunk, buffer, tags);
                if (tags && tags->ecc_result > YAFFS_ECC_RESULT_NO_ERROR) {
 
                        struct yaffs_block_info *bi;
                        bi = yaffs_get_block_info(dev,
                                          nand_chunk /
                                          dev->param.chunks_per_block);
                        yaffs_handle_chunk_error(dev, bi);
                }
                return result;
}
 
But actually, in NAND flash, only program and erase error can be marked bad block. Bit flip symptom is easy happen after a page is read many cycles.
If a system use YAFFS2, and never power down this system, user will see a lot of bad block after they run a time, But this block isn’t a real bad block.
How about just refresh the block when bit flip occur, but not record the bit flip count, and mark it as bad block?
Thanks
 
 
 
Best Regards,
Qi Wang 王起
EBU APAC SE
Tel: 86-021-38997158
Mobile: 86-15201958202
Address: No 601 Fasai Rd, Pudong, Shanghai, China, 200131
 
 

_______________________________________________
yaffs mailing list
yaffs@lists.aleph1.co.uk
http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs