From: Joel Peshkin Date: Tue, 21 Dec 2021 04:15:47 +0000 (-0800) Subject: BRCMNAND: Fix reporting of uncorrectable errors on subpages during page read X-Git-Tag: v2025.01-rc5-pxa1908~1583^2~5 X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=36a3b4ed5632d8da13e3b89796cfdd0683021224;p=u-boot.git BRCMNAND: Fix reporting of uncorrectable errors on subpages during page read 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 Cc: Simon Glass Reviewed-by: Simon Glass --- diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index f8434ca88d..74c9348f7f 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -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,