Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757140AbbLBVaU (ORCPT ); Wed, 2 Dec 2015 16:30:20 -0500 Received: from proxima.lp0.eu ([81.2.80.65]:47951 "EHLO proxima.lp0.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756517AbbLBVaQ (ORCPT ); Wed, 2 Dec 2015 16:30:16 -0500 Subject: Re: [PATCH] mtd: brcmnand: Workaround false ECC uncorrectable errors To: Jonas Gorski , Brian Norris References: <5659FF4A.7080203@simon.arlott.org.uk> <565F51D2.4010204@simon.arlott.org.uk> <20151202205415.GQ64635@google.com> Cc: Boris Brezillon , Florian Fainelli , Kamal Dasu , Linux Kernel Mailing List , bcm-kernel-feedback-list , MTD Maling List , David Woodhouse From: Simon Arlott Message-ID: <565F62C7.8010009@simon.arlott.org.uk> Date: Wed, 2 Dec 2015 21:29:43 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1509 Lines: 32 On 02/12/15 21:08, Jonas Gorski wrote: > On Wed, Dec 2, 2015 at 9:54 PM, Brian Norris > wrote: >> >> BTW, I think Kamal had code to handle protecting bitflips in erased >> pages code in the Broadcom STB Linux BSP. Perhaps he can port that to >> upstream with nand_check_erased_ecc_chunk()? IIUC, that would probably >> handle your case too, Simon, although it wouldn't be optimal for an >> all-0xff check (i.e., bitflip_threshold == 0). >> >> If that's really an issue (i.e., we have an implementation + data), I'm >> sure we could add optimization to nand_check_erased_ecc_chunk() to >> support the bitflip_threshold == 0 case. > > Maybe I'm missing something, but wasn't the point of introducing > nand_check_erased_ecc_chunk that bitflips in erased pages should be > treated as bitflips corrected by the ecc, and therefore fixed up > before passing the data further on? So having a theshold of 0 would be > wrong / no protection at all, and could be quite destructive on MLC > nand, where bitflips in erased pages are rather common. Without this patch I can't access erased pages at all. I don't know if the controller will still return an uncorrectable error if the page is erased but has 1 or more bit flips. -- Simon Arlott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/