From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Tue, 10 Mar 2015 13:49:46 -0500 Subject: [U-Boot] [PATCH v3 2/8] lpc32xx: mtd: nand: add MLC NAND controller In-Reply-To: <20150310135435.5191c96f.albert.aribaud@3adev.fr> References: <1425538018-10154-1-git-send-email-albert.aribaud@3adev.fr> <1425538018-10154-2-git-send-email-albert.aribaud@3adev.fr> <1425538018-10154-3-git-send-email-albert.aribaud@3adev.fr> <1425945063.4698.196.camel@freescale.com> <20150310135435.5191c96f.albert.aribaud@3adev.fr> Message-ID: <1426013386.30327.29.camel@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 2015-03-10 at 13:54 +0100, Albert ARIBAUD wrote: > Hi Scott, > > Le Mon, 9 Mar 2015 18:51:03 -0500, Scott Wood > a ?crit : > > > On Thu, 2015-03-05 at 07:46 +0100, Albert ARIBAUD (3ADEV) wrote: > > > + while (left) { > > > + if (read_single_page(dst, page) >= 0) { > > > + dst += LARGE_PAGE_SIZE; > > > + page++; > > > + left--; > > > + } > > > + } > > > > No bad block skipping? > > Hmm... actually the 'left--' should be just after the 'if' block, > otherwise not only will the code not skip a bad block, it will actually > loop infinitely trying to read it. Will fix in v4. Thanks for pointing > this out! What causes read_single_page() to fail when there's a bad block marker? Especially if the marker is on a different page of the block. I'm not talking about ECC failures (which should not silently be skipped). -Scott