From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5B57C433F5 for ; Tue, 21 Dec 2021 04:16:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0518482F65; Tue, 21 Dec 2021 05:16:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.b="R7L6wTxT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ED8FE83772; Tue, 21 Dec 2021 05:15:58 +0100 (CET) Received: from relay.smtp-ext.broadcom.com (saphodev.broadcom.com [192.19.11.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D7E058192E for ; Tue, 21 Dec 2021 05:15:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=joel.peshkin@broadcom.com Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.75.146.107]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 6CDDFC0000ED; Mon, 20 Dec 2021 20:15:54 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 6CDDFC0000ED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1640060154; bh=695YSvu3gKo7wn6fIKplezjlAq+qsDtRCof5HC1VdLQ=; h=From:To:Cc:Subject:Date:From; b=R7L6wTxT7qrefgEaAzoICVqUs9A57r/SD/9FZrUgmUYy0TNQfFatAfl9DKc66t/fH OR23uBjP97lFCSUm1lXwKkXkT5sxZrGAwsYUwyau7jSigG+oXkOTTXh5XI9aJIwFwV uxmJZaSWi3Yv3UDkYnoeDzFkZebJgXqXPsgENJWQ= Received: from xl-irv-24.lvn.broadcom.net (xl-irv-24.lvn.broadcom.net [10.75.135.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 3255418041CADC; Mon, 20 Dec 2021 20:15:54 -0800 (PST) From: Joel Peshkin To: u-boot@lists.denx.de Cc: Joel Peshkin , Simon Glass Subject: [PATCH] BRCMNAND: Fix reporting of uncorrectable errors on subpages during page read Date: Mon, 20 Dec 2021 20:15:47 -0800 Message-Id: <20211221041547.52964-1-joel.peshkin@broadcom.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean 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 --- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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