aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorMike Dunn <mikedunn@newsguy.com>2012-04-25 15:06:08 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-05-14 00:11:39 -0400
commitd062d4ede877fcd2ecc4c6262abad09a6f32950a (patch)
tree320869428d5aef43b803c4a8131140aabb21c8fb /include/linux/mtd
parenta9b672e82bca47bf2b37ee869b8095000cf3ca88 (diff)
mtd: bitflip_threshold added to mtd_info and sysfs
An element 'bitflip_threshold' is added to struct mtd_info, and also exposed as a read/write variable in sysfs. This will be used to determine whether or not mtd_read() returns -EUCLEAN or 0 (absent a hard error). If the driver leaves it as zero, mtd will set it to a default value of ecc_strength. This v2 adds the line that propagates bitflip_threshold from the master to the partitions - thanks Ivan¹. ¹ http://lists.infradead.org/pipermail/linux-mtd/2012-April/040900.html Signed-off-by: Mike Dunn <mikedunn@newsguy.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/mtd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index cd0119d19cd..63dadc0dfb6 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -157,6 +157,15 @@ struct mtd_info {
157 unsigned int erasesize_mask; 157 unsigned int erasesize_mask;
158 unsigned int writesize_mask; 158 unsigned int writesize_mask;
159 159
160 /*
161 * read ops return -EUCLEAN if max number of bitflips corrected on any
162 * one region comprising an ecc step equals or exceeds this value.
163 * Settable by driver, else defaults to ecc_strength. User can override
164 * in sysfs. N.B. The meaning of the -EUCLEAN return code has changed;
165 * see Documentation/ABI/testing/sysfs-class-mtd for more detail.
166 */
167 unsigned int bitflip_threshold;
168
160 // Kernel-only stuff starts here. 169 // Kernel-only stuff starts here.
161 const char *name; 170 const char *name;
162 int index; 171 int index;