]> git.dujemihanovic.xyz Git - u-boot.git/commit
mtd: rawnand: brcmnand: correctly verify erased pages
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Sat, 11 Feb 2023 15:29:04 +0000 (16:29 +0100)
committerDario Binacchi <dario.binacchi@amarulasolutions.com>
Mon, 27 Feb 2023 15:29:43 +0000 (16:29 +0100)
commit6091939c3475946e92cb0bef6278ec27f93f972b
tree8c3b63915dc9bc763d92569d10d33aae7334c741
parent2de9ff609db9f5dd72eff7d9c9336ceeb2ec7d6a
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: 02b88eea9f9c ("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
[Ported to U-Boot from the Linux kernel]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
drivers/mtd/nand/raw/brcmnand/brcmnand.c