]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
BRCMNAND: Fix reporting of uncorrectable errors on subpages during page read
authorJoel Peshkin <joel.peshkin@broadcom.com>
Tue, 21 Dec 2021 04:15:47 +0000 (20:15 -0800)
committerTom Rini <trini@konsulko.com>
Fri, 14 Jan 2022 18:16:11 +0000 (13:16 -0500)
Previously, a subpage with an uncorrectable error followed by a subpage
with a correctable error would return an erroneous correctable status.

Signed-off-by: Joel Peshkin <joel.peshkin@broadcom.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/mtd/nand/raw/brcmnand/brcmnand.c

index f8434ca88db0bf33d97f4020826feff12be3dafb..74c9348f7fc4d9bf32c84b16f81429938438246c 100644 (file)
@@ -1632,7 +1632,7 @@ static int brcmnand_read_by_pio(struct mtd_info *mtd, struct nand_chip *chip,
                                        mtd->oobsize / trans,
                                        host->hwcfg.sector_size_1k);
 
-               if (!ret) {
+               if (ret != -EBADMSG) {
                        *err_addr = brcmnand_read_reg(ctrl,
                                        BRCMNAND_UNCORR_ADDR) |
                                ((u64)(brcmnand_read_reg(ctrl,