aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/ABI/testing/sysfs-class-mtd
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/ABI/testing/sysfs-class-mtd')
-rw-r--r--Documentation/ABI/testing/sysfs-class-mtd52
1 files changed, 52 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-mtd b/Documentation/ABI/testing/sysfs-class-mtd
index 4d55a1888981..938ef71e2035 100644
--- a/Documentation/ABI/testing/sysfs-class-mtd
+++ b/Documentation/ABI/testing/sysfs-class-mtd
@@ -123,3 +123,55 @@ Description:
123 half page, or a quarter page). 123 half page, or a quarter page).
124 124
125 In the case of ECC NOR, it is the ECC block size. 125 In the case of ECC NOR, it is the ECC block size.
126
127What: /sys/class/mtd/mtdX/ecc_strength
128Date: April 2012
129KernelVersion: 3.4
130Contact: linux-mtd@lists.infradead.org
131Description:
132 Maximum number of bit errors that the device is capable of
133 correcting within each region covering an ecc step. This will
134 always be a non-negative integer. Note that some devices will
135 have multiple ecc steps within each writesize region.
136
137 In the case of devices lacking any ECC capability, it is 0.
138
139What: /sys/class/mtd/mtdX/bitflip_threshold
140Date: April 2012
141KernelVersion: 3.4
142Contact: linux-mtd@lists.infradead.org
143Description:
144 This allows the user to examine and adjust the criteria by which
145 mtd returns -EUCLEAN from mtd_read() and mtd_read_oob(). If the
146 maximum number of bit errors that were corrected on any single
147 region comprising an ecc step (as reported by the driver) equals
148 or exceeds this value, -EUCLEAN is returned. Otherwise, absent
149 an error, 0 is returned. Higher layers (e.g., UBI) use this
150 return code as an indication that an erase block may be
151 degrading and should be scrutinized as a candidate for being
152 marked as bad.
153
154 The initial value may be specified by the flash device driver.
155 If not, then the default value is ecc_strength.
156
157 The introduction of this feature brings a subtle change to the
158 meaning of the -EUCLEAN return code. Previously, it was
159 interpreted to mean simply "one or more bit errors were
160 corrected". Its new interpretation can be phrased as "a
161 dangerously high number of bit errors were corrected on one or
162 more regions comprising an ecc step". The precise definition of
163 "dangerously high" can be adjusted by the user with
164 bitflip_threshold. Users are discouraged from doing this,
165 however, unless they know what they are doing and have intimate
166 knowledge of the properties of their device. Broadly speaking,
167 bitflip_threshold should be low enough to detect genuine erase
168 block degradation, but high enough to avoid the consequences of
169 a persistent return value of -EUCLEAN on devices where sticky
170 bitflips occur. Note that if bitflip_threshold exceeds
171 ecc_strength, -EUCLEAN is never returned by the read operations.
172 Conversely, if bitflip_threshold is zero, -EUCLEAN is always
173 returned, absent a hard error.
174
175 This is generally applicable only to NAND flash devices with ECC
176 capability. It is ignored on devices lacking ECC capability;
177 i.e., devices for which ecc_strength is zero.