[U-Boot] [PATCH v3 2/8] lpc32xx: mtd: nand: add MLC NAND controller

Scott Wood scottwood at freescale.com
Tue Mar 10 19:49:46 CET 2015


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 <scottwood at freescale.com>
> 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




More information about the U-Boot mailing list