summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-04-28 20:26:59 +0300
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-05-25 02:01:22 +0100
commit26d9be11485ea8c1102c3e8eaa7667412eef4950 (patch)
tree0eb23f16e190a12458cd426c1bc82eb19b5f9f24 /drivers/mtd/nand
parent410fe2f02630fa76b5311c06b7411731202d3b68 (diff)
mtd: return badblockbits back
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 <parth.saxena@ti.com>" here: http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html Reported-by: Saxena, Parth <parth.saxena@ti.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Tested-by: Saxena, Parth <parth.saxena@ti.com> Acked-by: Saxena, Parth <parth.saxena@ti.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Cc: stable@kernel.org [2.6.36+] Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/nand_base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index bc1c2e6ae4a4..2201ca70af24 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3106,6 +3106,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;