From: Konstantin Baydarov <kbaidarov@dev.rtsoft.ru>
To: linux-mtd@lists.infradead.org
Subject: [PATCH] [MTD] NAND nand_bbt.c: badblock_pattern initialization
Date: Thu, 05 Oct 2006 15:54:08 +0400 [thread overview]
Message-ID: <4524F260.1040800@dev.rtsoft.ru> (raw)
[-- 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 ? */
reply other threads:[~2006-10-05 11:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4524F260.1040800@dev.rtsoft.ru \
--to=kbaidarov@dev.rtsoft.ru \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox