Skip to contentSkip to conversation

BRCMNAND: Fix reporting of uncorrectable errors on subpages during page read

PATCH In review Joel Peshkin 3 participants 3 messages Dec 21, 2021 – Jan 15, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/raw/brcmnand/brcmnand.c +1 -1
index f8434ca..74c9348 100644
@@ -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,
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Joel Peshkin

Previously, a subpage with an uncorrectable error followed by a subpage with a correctable error would return an erroneous correctable status.

---
 drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Note that we normally like to have the commit subject 60 chars at most.

Quoted 17 lines
drivers/mtd/nand/raw/brcmnand/brcmnand.c +1 -2
index f8434ca..74c9348 100644
@@ -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,
--

1.8.3.1