mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-07-16 22:38:04 +00:00
189ce92b4c
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
From bfaedde2c4ae9dcab0aabf7dc7172999df5669ec Mon Sep 17 00:00:00 2001
|
|
From: Roman Tereshonkov <roman.tereshonkov@nokia.com>
|
|
Date: Fri, 2 Dec 2011 15:07:17 +0200
|
|
Subject: [PATCH 002/129] mtd: mtdoops: skip reading initially bad blocks
|
|
|
|
commit 3538c56329936c78f7d356889908790006d0124c upstream.
|
|
|
|
Use block_isbad to check and skip the bad blocks reading.
|
|
This will allow to get rid of the read errors if bad blocks
|
|
are present initially.
|
|
|
|
Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
---
|
|
drivers/mtd/mtdoops.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
|
|
index 0782b31..f3cdce9 100644
|
|
--- a/drivers/mtd/mtdoops.c
|
|
+++ b/drivers/mtd/mtdoops.c
|
|
@@ -253,6 +253,9 @@ static void find_next_position(struct mtdoops_context *cxt)
|
|
size_t retlen;
|
|
|
|
for (page = 0; page < cxt->oops_pages; page++) {
|
|
+ if (mtd->block_isbad &&
|
|
+ mtd->block_isbad(mtd, page * record_size))
|
|
+ continue;
|
|
/* Assume the page is used */
|
|
mark_page_used(cxt, page);
|
|
ret = mtd->read(mtd, page * record_size, MTDOOPS_HEADER_SIZE,
|
|
--
|
|
1.7.9.5
|
|
|