mtd: return badblockbits back

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue May 24 21:59:04 EDT 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=26d9be11485ea8c1102c3e8eaa7667412eef4950
Commit:     26d9be11485ea8c1102c3e8eaa7667412eef4950
Parent:     410fe2f02630fa76b5311c06b7411731202d3b68
Author:     Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
AuthorDate: Thu Apr 28 20:26:59 2011 +0300
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Wed May 25 02:01:22 2011 +0100

    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 at ti.com>" here:
    http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html
    
    Reported-by: Saxena, Parth <parth.saxena at ti.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Tested-by: Saxena, Parth <parth.saxena at ti.com>
    Acked-by: Saxena, Parth <parth.saxena at ti.com>
    Acked-by: Brian Norris <computersforpeace at gmail.com>
    Cc: stable at kernel.org [2.6.36+]
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/nand_base.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index bc1c2e6..2201ca7 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;



More information about the linux-mtd-cvs mailing list