[PATCH] OneNAND: Simple Bad Block handling support

Kyungmin Park kyungmin.park at samsung.com
Wed Sep 7 07:44:55 EDT 2005


> 
> 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!
> 

Yes, The bbt scheme is same as NAND does. and OneNAND bbt is subset of NAND
bbt.
IMHO, There's some historical reason. If I was worng. please correct it
MTD only provides basic operations and handles initial badblock.
The rest is the part of FTL or Filesystem. Is it right?

Regards,

Kyungmin Park





More information about the linux-mtd mailing list