mtd: nand: Use the mirror BBT descriptor when reading its version
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Jul 6 13:59:05 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=7bb9c75436212813b38700c34df4bbb6eb82debe
Commit: 7bb9c75436212813b38700c34df4bbb6eb82debe
Parent: 75453a08e3658ca467cda3c5fe5632e563742421
Author: Shmulik Ladkani <shmulik.ladkani at gmail.com>
AuthorDate: Sun Jun 10 13:58:12 2012 +0300
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Jul 6 18:17:06 2012 +0100
mtd: nand: Use the mirror BBT descriptor when reading its version
The code responsible for reading the version of the mirror bbt was
incorrectly using the descriptor of the main bbt.
Pass the mirror bbt descriptor to 'scan_read_raw' when reading the
version of the mirror bbt.
Signed-off-by: Shmulik Ladkani <shmulik.ladkani at gmail.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
Cc: stable at vger.kernel.org [v2.6.37+]
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/nand_bbt.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 30d1319..c126469 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -390,7 +390,7 @@ static int read_abs_bbts(struct mtd_info *mtd, uint8_t *buf,
/* Read the mirror version, if available */
if (md && (md->options & NAND_BBT_VERSION)) {
scan_read_raw(mtd, buf, (loff_t)md->pages[0] << this->page_shift,
- mtd->writesize, td);
+ mtd->writesize, md);
md->version[0] = buf[bbt_get_ver_offs(mtd, md)];
pr_info("Bad block table at page %d, version 0x%02X\n",
md->pages[0], md->version[0]);
More information about the linux-mtd-cvs
mailing list