Skip to content

Commit

Permalink
[MTD] Add ECC statistics to struct mtd_info
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Gleixner authored and David Woodhouse committed May 25, 2006
1 parent 7314e9e commit 7fac464
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/linux/mtd/mtd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -153,6 +164,9 @@ struct mtd_info {

struct notifier_block reboot_notifier; /* default mode before reboot */

/* ECC status information */
struct mtd_ecc_stats ecc_stats;

void *priv;

struct module *owner;
Expand Down

0 comments on commit 7fac464

Please sign in to comment.