From: Artem Bityutskiy Date: Thu, 28 Apr 2011 17:26:59 +0000 (+0300) Subject: mtd: return badblockbits back X-Git-Tag: v2.6.39.1~135 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=78a26f6c46eb3c01982b07048a1c547c5c16a4ff;p=karo-tx-linux.git 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 --- 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;