From 78a26f6c46eb3c01982b07048a1c547c5c16a4ff Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Thu, 28 Apr 2011 20:26:59 +0300 Subject: [PATCH] mtd: return badblockbits back commit 26d9be11485ea8c1102c3e8eaa7667412eef4950 upstream. In commit c7b28e25cb9beb943aead770ff14551b55fa8c79 the initialization of the backblockbits was accidentally removed. This patch returns it back, because otherwise some NAND drivers are broken. This problem was reported by "Saxena, Parth " here: http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html Reported-by: Parth Saxena Signed-off-by: Artem Bityutskiy Tested-by: Parth Saxena Acked-by: Parth Saxena Acked-by: Brian Norris Signed-off-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/nand_base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index c54a4cbac6bc..d1345fcefed7 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -3112,6 +3112,8 @@ ident_done: chip->chip_shift += 32 - 1; } + chip->badblockbits = 8; + /* Set the bad block position */ if (mtd->writesize > 512 || (busw & NAND_BUSWIDTH_16)) chip->badblockpos = NAND_LARGE_BADBLOCK_POS; -- 2.39.5