[MTD] Add ECC statistics to struct mtd_info

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu May 25 08:59:06 EDT 2006


Commit:     7fac464868ec5d80019fa549b8b4516dd1dc9d5c
Parent:     7314e9e7d57293c58b3e10a25a8a1d9328444187
Author:     Thomas Gleixner <tglx at cruncher.tec.linutronix.de>
AuthorDate: Thu May 25 09:57:31 2006 +0200
Commit:     David Woodhouse <dwmw2 at infradead.org>
CommitDate: Thu May 25 12:45:27 2006 +0100

    [MTD] Add ECC statistics to struct mtd_info
    
    FLASH - especially NAND FLASH - will become less reliable
    and bit flips more likely. Add an ECC statistics struct
    to struct mtd_info to keep track of this.
    
    Signed-off-by: Thomas Gleixner <tglx at linutronix.de>

 include/linux/mtd/mtd.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index b8ad634..41a984d 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -56,6 +56,17 @@ struct mtd_erase_region_info {
 	u_int32_t numblocks;		/* Number of blocks of erasesize in this region */
 };
 
+/**
+ * struct mtd_ecc_stats - error correction status
+ *
+ * @corrected:	number of corrected bits
+ * @failed:	number of uncorrectable errors
+ */
+struct mtd_ecc_stats {
+	unsigned long corrected;
+	unsigned long failed;
+};
+
 struct mtd_info {
 	u_char type;
 	u_int32_t flags;
@@ -153,6 +164,9 @@ #define MTD_PROGREGION_CTRLMODE_INVALID(
 
 	struct notifier_block reboot_notifier;  /* default mode before reboot */
 
+	/* ECC status information */
+	struct mtd_ecc_stats ecc_stats;
+
 	void *priv;
 
 	struct module *owner;



More information about the linux-mtd-cvs mailing list