Hi Pekon, On Mon, Jul 15, 2013 at 8:25 PM, Pekon Gupta <pekon@xxxxxx> wrote: > chip->ecc.correct() is used for detecting and correcting bit-flips during read > operations. In omap2-nand driver this is done usingt following functions: > > - omap_correct_data(): for H/W based HAM1_ECC schemes > (Un-Touched in current patch) > > - omap_elm_correct_data(): for H/W based BCHx_ECC scheme > Current implementation of this function is not scalable for newer ECC > schemes because: > - It depends on a specific byte-position in OOB area (reserved as 0x00) > to differentiates between programmed-pages and erased-pages. > This reserved byte-position cannot be accomodated in all ECC schemes. > - Current code is not scalable for future ECC schemes due to tweaks for > BCH4_ECC and BCH8_ECC at multiple places. > - It checks for bit-flips in Erased-pages using check_erased_page(). > This is over-work, as sanity of Erased-page can be verified by just > comparing them to a pre-defined ECC-syndrome for all_0xFF data. This is correct if the erased page read back didn't have any bit flips. If erased page result in bit flips, then this method will end up in un-correctable error. Can you please confirm you taken care erased page bit flips in this modification? I think below discussion would help. https://lkml.org/lkml/2012/11/22/590 Thanks Avinash -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html