Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753805AbbHZVey (ORCPT ); Wed, 26 Aug 2015 17:34:54 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:36014 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752479AbbHZVew (ORCPT ); Wed, 26 Aug 2015 17:34:52 -0400 Date: Wed, 26 Aug 2015 14:34:48 -0700 From: Brian Norris To: Stefan Agner Cc: bpringlemeir@gmail.com, sebastian@breakpoint.cc, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, shawn.guo@linaro.org, kernel@pengutronix.de, boris.brezillon@free-electrons.com, marb@ixxat.de, aaron@tastycactus.com, linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, albert.aribaud@3adev.fr, klimov.linux@gmail.com, Bill Pringlemeir Subject: Re: [PATCH v10 2/5] mtd: nand: vf610_nfc: add hardware BCH-ECC support Message-ID: <20150826213448.GU81844@google.com> References: <1438594050-4595-1-git-send-email-stefan@agner.ch> <1438594050-4595-3-git-send-email-stefan@agner.ch> <20150825195411.GJ81844@google.com> <07a479863eef4c53ab2ef6ef85321680@agner.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <07a479863eef4c53ab2ef6ef85321680@agner.ch> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1931 Lines: 40 On Wed, Aug 26, 2015 at 10:57:38AM -0700, Stefan Agner wrote: > On 2015-08-25 12:54, Brian Norris wrote: > > On Mon, Aug 03, 2015 at 11:28:43AM +0200, Stefan Agner wrote: > >> Btw, if the ECC check fails, the controller seems kind of count the > >> amount of bitflips. It works for most devices reliable, but we had > >> devices for which that number was not accurate, see: > >> http://thread.gmane.org/gmane.linux.ports.arm.kernel/357439 > > > > I'm a little confused there. Why would you be expecting to get a count > > of bitflips, when the ECC engine can't correct all errors? How is it > > supposed to know what the "right" data is if the bit errors are beyond > > the correction strength? > > When printing the ECC error count on ECC fail when reading an erased > NAND flash, the numbers of bit flips (stuck at zero) seem to widely > correlate with the number returned by the controller. While it seems to > correlate widely, there are exceptions, as discussed in the thread: > http://thread.gmane.org/gmane.linux.ports.arm.kernel/295424 > > Maybe this is an artifact of the ECC algorithm we just can't/shouldn't > rely on? I am not sure where this originated, I did not found any > indication in the reference manual about what that value contains in the > error case. Doesn't sound too reliable to me. And I'm not sure even if it was reliable, that it would provide much value. We have to a lot of re-counting anyway, so we might as well just be using our own threshold. Or maybe I'm missing the point. > Bill, do you have an idea why we used that value as threshold in early > implementations? > > Otherwise I also think we should just drop the use of this value. Brian -- 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/