UBI torture_peb() bad block detection problem

Richard Genoud richard.genoud at gmail.com
Mon Jun 3 08:48:55 EDT 2013


2013/5/31 Qiang Yu <yuq825 at gmail.com>:
> Here is my driver, and it can now be used with UBI+UBIFS.
> https://github.com/yuq/sunxi-nfc-mtd

I had a look at your driver, it seems that you forgot to set ecc.strenght.
take a look at this driver for instance: drivers/mtd/nand/jz4740_nand.c
the chip->ecc.strength is set to the max correctable bitflips.
The ecc.correct function returns the actual number of bitflips that
happened during reading.
And as Artem said, the mtd layer returns an error only if ret_code >=
mtd->bitflip_threshold ? -EUCLEAN : 0;
(and bitflip_threshold is == ecc.strenght in nand)

Richard.



More information about the linux-mtd mailing list