From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 19 Aug 2011 23:47:23 +0200 Subject: [U-Boot] [PATCH] NAND: Really ignore bad blocks when scrubbing In-Reply-To: <4E4EC2C1.6070506@freescale.com> References: <1313514195-27345-1-git-send-email-marek.vasut@gmail.com> <4E4EC2C1.6070506@freescale.com> Message-ID: <201108192347.23624.marek.vasut@gmail.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 Friday, August 19, 2011 10:08:33 PM Scott Wood wrote: > On 08/16/2011 12:03 PM, Marek Vasut wrote: > > Signed-off-by: Marek Vasut > > --- > > > > drivers/mtd/nand/nand_base.c | 2 +- > > drivers/mtd/nand/nand_util.c | 1 + > > include/linux/mtd/mtd.h | 1 + > > 3 files changed, 3 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c > > index a5f872e..3093067 100644 > > --- a/drivers/mtd/nand/nand_base.c > > +++ b/drivers/mtd/nand/nand_base.c > > @@ -2224,7 +2224,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct > > erase_info *instr, > > > > /* > > > > * heck if we have a bad block, we do not erase bad blocks ! > > */ > > > > - if (nand_block_checkbad(mtd, ((loff_t) page) << > > + if (!instr->scrub && nand_block_checkbad(mtd, ((loff_t) page) << > > > > chip->page_shift, 0, allowbbt)) { > > > > printk(KERN_WARNING "nand_erase: attempt to erase a " > > > > "bad block at page 0x%08x\n", page); > > Changelog should describe why the existing mechanism of overriding the > block_bad method is insufficient (I think there may be issues if you try > to scrub before the bbt is first built) -- and if this supersedes that > mechanism, that mechanism should be removed. Indeed, this completely ignores the BBT, unlike the previous way. From my understanding, scrub should behave this way, right ? > > -Scott