Skip to contentSkip to conversation

Please explain bbt_create (problems)

DISCUSSION Andriy Korud 2 participants 2 messages Jul 15, 2005 – Jul 16, 2005 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,
I'm trying to understand how initial bbt_ceate works?
I have NAND chip erased for jffs2 (flash_erasall -j) with some data in OOB (jffs2 clean masrkers). And bbt_create() calls check_pattern() which compare each byte with 0xff, in my case comparision fails (jffs2 cleanmarker != 0xff) and I have every block marked as bad. Should not check_pattern() checks only byte at 0x05 in OOB (according to http://www.linux-mtd.infradead.org/tech/mtdnand/x255.html )?
Also is it possible to scan chip for bbt starting from certain block (not 0) without dirty changes in mtd code?

Thanks in advance,
Andriy Korud

#1 lore raw

Please fix your mail client to do a line wrap at 76 characters

Read

Quoted 8 lines · Andriy Korud

Hi,
I'm trying to understand how initial bbt_ceate works?
I have NAND chip erased for jffs2 (flash_erasall -j) with some data in OOB (jffs2 clean masrkers). And bbt_create() calls check_pattern() which compare each byte with 0xff, in my case comparision fails (jffs2 cleanmarker != 0xff) and I have every block marked as bad. Should not check_pattern() checks only byte at 0x05 in OOB (according to http://www.linux-mtd.infradead.org/tech/mtdnand/x255.html )?

Maybe you read also:

http://www.linux-mtd.infradead.org/tech/mtdnand/x144.html

"...Therefor we scan the chip(s) when we detect them the first time for good blocks and store this information in
a bad block table before erasing any of the blocks."

Emphasis is on the phrase "first time".

I can see that this could have been described more clear, but it definitely makes no sense to create a flash based bad block table _after_ using the chip.

Quoted 2 lines

Also is it possible to scan chip for bbt starting from certain block (not 0) without dirty changes in mtd code?

no

tglx