Received: from mout.gmx.net ([212.227.17.20])
by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux))
id 1Y4ou0-0006YO-Gh
for linux-mtd@lists.infradead.org; Sat, 27 Dec 2014 10:47:21 +0000
From: Oleksij Rempel
1) Wiser controllers are generating 0xff ECC bytes for a data chunk +(chunk == ECC step size) filled with 0xff. With BCH algorithms this is +easily done by XORing the ECC bytes with the appropriate pattern (see +soft BCH implementation)
+2) Some controller just verify if the data chunk + ECC bytes are all +0xff before passing it to the ECC engine. If they are filled with 0xff +the ECC correction is bypassed.
+This method has one drawback: it does not properly handle bitflips +occurring in erased pages (if one bitflip occurs the NAND controller +consider the chunk as not empty, and pass it to the BCH engine).
+3) The controller does not handle erased pages at all, and in this case +you'll have to manually test it (see is_buf_blank in drivers/mtd/nand/pxa3xx_nand.c) when you +encounter an ECC error.