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

Simon Glass sjg at chromium.org
Tue Dec 28 09:33:29 CET 2021


On Mon, 20 Dec 2021 at 21:15, Joel Peshkin <joel.peshkin at broadcom.com> wrote:
>
> 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 at broadcom.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
>  drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>

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


>
> diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
> index f8434ca..74c9348 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,
> --
> 1.8.3.1
>


More information about the U-Boot mailing list