]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: rawnand: brcmnand: correctly verify erased pages
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Tue, 12 May 2020 08:24:51 +0000 (10:24 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 24 May 2020 18:39:39 +0000 (20:39 +0200)
commit9c6c04c6ba425a0c33f3c9194289bf97b5a0f6c2
treeae4083da922063c3c6e75a0d6f525aca5a8f05e0
parentbb1cc8558dc18033861a6e649e0c2b7d15c4484a
mtd: rawnand: brcmnand: correctly verify erased pages

The current code checks that the whole OOB area is erased.
This is a problem when JFFS2 cleanmarkers are added to the OOB, since it will
fail due to the usable OOB bytes not being 0xff.
Correct this by only checking that data and ECC bytes aren't 0xff.

Fixes: 4755ef15021c ("mtd: brcmnand: Add check for erased page bitflips")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200512082451.771212-1-noltari@gmail.com
drivers/mtd/nand/raw/brcmnand/brcmnand.c