* [PATCH] [MTD] NAND nand_bbt.c: badblock_pattern initialization
@ 2006-10-05 11:54 Konstantin Baydarov
0 siblings, 0 replies; only message in thread
From: Konstantin Baydarov @ 2006-10-05 11:54 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
In case of AND chips(NAND_IS_AND) (struct nand_chip
*)chip->badblock_pattern stay uninitialized, see nand_default_bbt().
It seems badblock_pattern is used only in nand_scan_bbt(), but it's
better to initialize badblock_pattern before calling nand_scan_bbt(),
like it's done for other chips.
[-- Attachment #2: bbpattern_init.patch --]
[-- Type: text/x-patch, Size: 628 bytes --]
Signed-off-by: Konstantin Baydarov <kbaidarov@dev.rtsoft.ru>
Index: linux-2.6.18/drivers/mtd/nand/nand_bbt.c
===================================================================
--- linux-2.6.18.orig/drivers/mtd/nand/nand_bbt.c
+++ linux-2.6.18/drivers/mtd/nand/nand_bbt.c
@@ -1165,7 +1165,8 @@ int nand_default_bbt(struct mtd_info *mt
this->bbt_md = &bbt_mirror_descr;
}
this->options |= NAND_USE_FLASH_BBT;
- return nand_scan_bbt(mtd, &agand_flashbased);
+ this->badblock_pattern = &agand_flashbased;
+ return nand_scan_bbt(mtd, this->badblock_pattern);
}
/* Is a flash based bad block table requested ? */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-05 11:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-05 11:54 [PATCH] [MTD] NAND nand_bbt.c: badblock_pattern initialization Konstantin Baydarov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox