Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422796AbdDVHCG (ORCPT ); Sat, 22 Apr 2017 03:02:06 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:42030 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1042511AbdDVHBm (ORCPT ); Sat, 22 Apr 2017 03:01:42 -0400 Date: Sat, 22 Apr 2017 09:01:39 +0200 From: Pavel Machek To: Boris Brezillon Cc: Dipen.Dudhat@freescale.com, richard@nod.at, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, cyrille.pitchen@atmel.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, mark.marshall@omicronenergy.com, b44839@freescale.com, prabhakar@freescale.com Subject: Re: fsl_ifc_nand: are blank pages protected by ECC? Message-ID: <20170422070139.GA15339@amd> References: <20170419121332.GA26979@amd> <20170419231804.5a04ed69@bbrezillon> <20170421100813.GA4332@amd> <20170421133721.GA15332@amd> <20170421154903.2782cd06@bbrezillon> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: <20170421154903.2782cd06@bbrezillon> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1413 Lines: 57 --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > Maybe I figured it out. Unfortunately, it is only compile tested. Does > > it look approximately right? >=20 > Yep that's definitely better. Just one thing missing (see below), > otherwise it looks good. Thanks for review. Unfortunately it is still untested, so... > > + if (res < 0) > > + mtd->ecc_stats.failed++; >=20 > else > mtd->ecc_stats.corrected +=3D res; Ok, I copied this from tango_nand. I'll submit a patch to fix it there... > > + > > + bitflips =3D max(res, bitflips); > > + buf +=3D pkt_size; > > + ecc +=3D ecc_size; > > + } > > + > > + mtd_ooblayout_ecc(mtd, 1, &oobregion); > > + BUG_ON(oobregion.length); >=20 > Probably something you should check at registration time only. Drive defensively, buy a tank ;-). Ok, I'll delete this one in final version. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --gKMricLos+KVdGMg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlj6/9MACgkQMOfwapXb+vL7PwCgp8GSbGRWMzs5hocN/NitXE0H 5R4An3UdBqXduj6GqEjDj+FkMROCdRRK =lrJ/ -----END PGP SIGNATURE----- --gKMricLos+KVdGMg--