提交 26d9be11 编写于 作者: A Artem Bityutskiy 提交者: David Woodhouse

mtd: return badblockbits back

In commit c7b28e25 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 <parth.saxena@ti.com>" here:
http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.htmlReported-by: NSaxena, Parth <parth.saxena@ti.com>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tested-by: NSaxena, Parth <parth.saxena@ti.com>
Acked-by: NSaxena, Parth <parth.saxena@ti.com>
Acked-by: NBrian Norris <computersforpeace@gmail.com>
Cc: stable@kernel.org [2.6.36+]
Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
上级 410fe2f0
......@@ -3106,6 +3106,8 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册