From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yqq0G-0003O5-2m for linux-mtd@lists.infradead.org; Fri, 08 May 2015 21:40:16 +0000 Received: by pacwv17 with SMTP id wv17so59810814pac.0 for ; Fri, 08 May 2015 14:39:54 -0700 (PDT) Date: Fri, 8 May 2015 14:39:47 -0700 From: Brian Norris To: Ben Shelton Subject: Re: [PATCH 1/3] mtd: nand: Add on-die ECC support Message-ID: <20150508213947.GF32500@ld-irv-0074> References: <1427292151-3835-1-git-send-email-richard@nod.at> <1427292151-3835-2-git-send-email-richard@nod.at> <20150427213558.GA22780@bshelton-desktop> <553EB5E4.3050309@nod.at> <20150427232353.GD32500@ld-irv-0074> <20150428032213.GI19571@brian-ubuntu> <20150508212632.GA7167@bshelton-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150508212632.GA7167@bshelton-desktop> Cc: Boris Brezillon , Richard Weinberger , "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" , Punnaiah Choudary Kalluri , punnaiah choudary kalluri , David Woodhouse List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, May 08, 2015 at 04:26:32PM -0500, Ben Shelton wrote: > On 04/27, Brian Norris wrote: > > On Tue, Apr 28, 2015 at 08:18:12AM +0530, punnaiah choudary kalluri wrote: > > > On Tue, Apr 28, 2015 at 4:53 AM, Brian Norris > > > wrote: > > > > On Tue, Apr 28, 2015 at 12:19:16AM +0200, Richard Weinberger wrote: > > > >> Oh, I thought every driver has to implement that function. ;-\ > > > > > > > > Nope. > > > > > > > >> But you're right there is a corner case. > > > > > > > > And it's not the only one! Right now, there's no guarantee even that > > > > read_buf() returns raw data, unmodified by the SoC's controller. Plenty > > > > of drivers actually have HW-enabled ECC turned on by default, and so > > > > they override the chip->ecc.read_page() (and sometimes > > > > chip->ecc.read_page_raw() functions, if we're lucky) with something > > > > that pokes the appropriate hardware instead. I expect anything > > > > comprehensive here is probably going to have to utilize > > > > chip->ecc.read_page_raw(), at least if it's provided by the hardware > > > > driver. > > > > > > Yes, overriding the chip->ecc.read_page_raw would solve this. > > > > I'm actually suggesting that (in this patch set, for on-die ECC > > support), maybe we *shouldn't* override chip->ecc.read_page_raw() and > > leave that to be defined by the driver, and then on-die ECC support > > should be added in a way that just calls chip->ecc.read_page_raw(). This > > should work for any driver that already properly supports the raw > > callbacks. > > > > Hi Richard et al, > > I'm guessing it's probably too late for the on-die ECC stuff to land in > 4.2 at this point. Not technically. We've got several weeks (approx 5 to 6?) before 4.1 is released. 4.2 material should be getting finalized by a week or so before the merge window (i.e., 4 to 5 weeks from now). > Is there anything I can do to help this along > (testing, etc.)? This is going to need to get rewritten. I'm not sure if Richard is going to tackle this again, as he hasn't responded to the points I brought up. (Note that Richard is not the first to have tried to implement this, without initial success.) Brian