提交 7fac4648 编写于 作者: T Thomas Gleixner 提交者: David Woodhouse

[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: NThomas Gleixner <tglx@linutronix.de>
上级 7314e9e7
...@@ -56,6 +56,17 @@ struct mtd_erase_region_info { ...@@ -56,6 +56,17 @@ struct mtd_erase_region_info {
u_int32_t numblocks; /* Number of blocks of erasesize in this region */ 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 { struct mtd_info {
u_char type; u_char type;
u_int32_t flags; u_int32_t flags;
...@@ -153,6 +164,9 @@ struct mtd_info { ...@@ -153,6 +164,9 @@ struct mtd_info {
struct notifier_block reboot_notifier; /* default mode before reboot */ struct notifier_block reboot_notifier; /* default mode before reboot */
/* ECC status information */
struct mtd_ecc_stats ecc_stats;
void *priv; void *priv;
struct module *owner; struct module *owner;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册