[PATCH] OneNAND: Simple Bad Block handling support

Bernhard Priewasser priewasser at gmail.com
Wed Sep 7 04:09:54 EDT 2005


Hi all,

Kyungmin, I'm still not completely clear about your bad block handling, 
sorry for bothering you another time.

In onenand_scan() you call scan_bbt() which calls onenand_memory_bbt() 
  which calls create_bbt() which builds the BBT using OOB data.
Fine so far.

But: the only time onenand_block_checkbad() is called is in 
onenand_erase() before issueing the (erase-)command to prevent erasing 
already scanned bad blocks.

Question: what about reading and writing (onenand_write_ecc(), 
onenand_read_ecc())? There is no onenand_block_checkbad() before 
issueing the write/read command. Shouldn't this be done??
scan_bbt() is only called on initial scan, e.g. device boot. What if 
this happens very rarely and bad blocks due to wear occur; that meant 
you cannot provide data integrity.

I wonder why this is not done in nand_base.c too. I'm afraid I missed 
some BBT stuff to gather in my investigations :-)... So please kindly 
excuse me if I'm wrong with my very limited MTD/OneNAND experience!

Best Regards,
Bernhard




More information about the linux-mtd mailing list