]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.38.8/mtd-return-badblockbits-back.patch
drop drm patch
[thirdparty/kernel/stable-queue.git] / releases / 2.6.38.8 / mtd-return-badblockbits-back.patch
1 From 26d9be11485ea8c1102c3e8eaa7667412eef4950 Mon Sep 17 00:00:00 2001
2 From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
3 Date: Thu, 28 Apr 2011 20:26:59 +0300
4 Subject: mtd: return badblockbits back
5
6 From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
7
8 commit 26d9be11485ea8c1102c3e8eaa7667412eef4950 upstream.
9
10 In commit c7b28e25cb9beb943aead770ff14551b55fa8c79 the initialization of
11 the backblockbits was accidentally removed. This patch returns it back,
12 because otherwise some NAND drivers are broken.
13
14 This problem was reported by "Saxena, Parth <parth.saxena@ti.com>" here:
15 http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html
16
17 Reported-by: Parth Saxena <parth.saxena@ti.com>
18 Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
19 Tested-by: Parth Saxena <parth.saxena@ti.com>
20 Acked-by: Parth Saxena <parth.saxena@ti.com>
21 Acked-by: Brian Norris <computersforpeace@gmail.com>
22 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
23 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
24
25 ---
26 drivers/mtd/nand/nand_base.c | 2 ++
27 1 file changed, 2 insertions(+)
28
29 --- a/drivers/mtd/nand/nand_base.c
30 +++ b/drivers/mtd/nand/nand_base.c
31 @@ -3111,6 +3111,8 @@ ident_done:
32 chip->chip_shift += 32 - 1;
33 }
34
35 + chip->badblockbits = 8;
36 +
37 /* Set the bad block position */
38 if (mtd->writesize > 512 || (busw & NAND_BUSWIDTH_16))
39 chip->badblockpos = NAND_LARGE_BADBLOCK_POS;