summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/debug.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-06-28 18:16:55 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-07-05 17:47:03 +0200
commit40a71a87fa8e0cb3ec0fca4d152263734b203eb2 (patch)
tree8bdd27304fc4d28c850c76f2b1f4a32c802612f8 /drivers/mtd/ubi/debug.h
parentLinux 2.6.31-rc2 (diff)
downloadlinux-40a71a87fa8e0cb3ec0fca4d152263734b203eb2.tar.xz
linux-40a71a87fa8e0cb3ec0fca4d152263734b203eb2.zip
UBI: add empty eraseblocks verification
This patch adds code which makes sure eraseblocks contain all 0xFF bytes before starting using them. The verification is done only when debugging checks are enabled. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/debug.h')
-rw-r--r--drivers/mtd/ubi/debug.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index 13777e5beac9..6fc7fda2ab91 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -93,6 +93,12 @@ void ubi_dbg_dump_mkvol_req(const struct ubi_mkvol_req *req);
#define UBI_IO_DEBUG 0
#endif
+#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID
+int ubi_dbg_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len);
+#else
+#define ubi_dbg_check_all_ff(ubi, pnum, offset, len) 0
+#endif
+
#ifdef CONFIG_MTD_UBI_DEBUG_DISABLE_BGT
#define DBG_DISABLE_BGT 1
#else