diff options
author | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-25 03:57:31 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-25 07:45:27 -0400 |
commit | 7fac464868ec5d80019fa549b8b4516dd1dc9d5c (patch) | |
tree | 0b8003852a430e91c31481bf6bb8cec66993199b /include/linux/mtd | |
parent | 7314e9e7d57293c58b3e10a25a8a1d9328444187 (diff) |
[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@linutronix.de>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | 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 b8ad634391db..41a984dcb139 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -56,6 +56,17 @@ struct mtd_erase_region_info { | |||
56 | u_int32_t numblocks; /* Number of blocks of erasesize in this region */ | 56 | u_int32_t numblocks; /* Number of blocks of erasesize in this region */ |
57 | }; | 57 | }; |
58 | 58 | ||
59 | /** | ||
60 | * struct mtd_ecc_stats - error correction status | ||
61 | * | ||
62 | * @corrected: number of corrected bits | ||
63 | * @failed: number of uncorrectable errors | ||
64 | */ | ||
65 | struct mtd_ecc_stats { | ||
66 | unsigned long corrected; | ||
67 | unsigned long failed; | ||
68 | }; | ||
69 | |||
59 | struct mtd_info { | 70 | struct mtd_info { |
60 | u_char type; | 71 | u_char type; |
61 | u_int32_t flags; | 72 | u_int32_t flags; |
@@ -153,6 +164,9 @@ struct mtd_info { | |||
153 | 164 | ||
154 | struct notifier_block reboot_notifier; /* default mode before reboot */ | 165 | struct notifier_block reboot_notifier; /* default mode before reboot */ |
155 | 166 | ||
167 | /* ECC status information */ | ||
168 | struct mtd_ecc_stats ecc_stats; | ||
169 | |||
156 | void *priv; | 170 | void *priv; |
157 | 171 | ||
158 | struct module *owner; | 172 | struct module *owner; |