Commit 756963d7 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Scott Wood
Browse files

mtd: nand: revive "nand scrub" command

Since commit ff94bc40

 (mtd, ubi, ubifs: resync with Linux-3.14),
the "nand scrub" command has not been working.
Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Heiko Schocher <hs@denx.de>
parent b188067f
......@@ -2905,7 +2905,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
WATCHDOG_RESET();
/* Check 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)) {
pr_warn("%s: attempt to erase a bad block at page 0x%08x\n",
__func__, page);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment