stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "mtd: nand: brcmnand: Zero bitflip is not an error" has been added to the 4.14-stable tree
@ 2018-02-28 15:26 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-02-28 15:26 UTC (permalink / raw)
  To: wen.hsieh, alexander.levin, boris.brezillon, gregkh, richard
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    mtd: nand: brcmnand: Zero bitflip is not an error

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mtd-nand-brcmnand-zero-bitflip-is-not-an-error.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Wed Feb 28 16:23:28 CET 2018
From: Albert Hsieh <wen.hsieh@broadcom.com>
Date: Mon, 20 Nov 2017 11:26:26 +0800
Subject: mtd: nand: brcmnand: Zero bitflip is not an error

From: Albert Hsieh <wen.hsieh@broadcom.com>


[ Upstream commit e44b9a9c135727f3410e029910275f40681dc8bc ]

A negative return value of brcmstb_nand_verify_erased_page() indicates a
real bitflip error of an erased page, and other return values (>= 0) show
the corrected bitflip number. Zero return value means no bitflip, but the
current driver code treats it as an error, and eventually leads to
falsely reported ECC error.

Fixes: 02b88eea9f9c ("mtd: brcmnand: Add check for erased page bitflip")
Signed-off-by: Albert Hsieh <wen.hsieh@broadcom.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/mtd/nand/brcmnand/brcmnand.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/mtd/nand/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/brcmnand/brcmnand.c
@@ -1763,7 +1763,7 @@ try_dmaread:
 			err = brcmstb_nand_verify_erased_page(mtd, chip, buf,
 							      addr);
 			/* erased page bitflips corrected */
-			if (err > 0)
+			if (err >= 0)
 				return err;
 		}
 


Patches currently in stable-queue which might be from wen.hsieh@broadcom.com are

queue-4.14/mtd-nand-brcmnand-zero-bitflip-is-not-an-error.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-28 15:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-28 15:26 Patch "mtd: nand: brcmnand: Zero bitflip is not an error" has been added to the 4.14-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).