~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/ABI/testing/sysfs-class-mtd

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/ABI/testing/sysfs-class-mtd (Architecture i386) and /Documentation/ABI/testing/sysfs-class-mtd (Architecture ppc)


  1 What:           /sys/class/mtd/                     1 What:           /sys/class/mtd/
  2 Date:           April 2009                          2 Date:           April 2009
  3 KernelVersion:  2.6.29                              3 KernelVersion:  2.6.29
  4 Contact:        linux-mtd@lists.infradead.org       4 Contact:        linux-mtd@lists.infradead.org
  5 Description:                                        5 Description:
  6                 The mtd/ class subdirectory be      6                 The mtd/ class subdirectory belongs to the MTD subsystem
  7                 (MTD core).                         7                 (MTD core).
  8                                                     8 
  9 What:           /sys/class/mtd/mtdX/                9 What:           /sys/class/mtd/mtdX/
 10 Date:           April 2009                         10 Date:           April 2009
 11 KernelVersion:  2.6.29                             11 KernelVersion:  2.6.29
 12 Contact:        linux-mtd@lists.infradead.org      12 Contact:        linux-mtd@lists.infradead.org
 13 Description:                                       13 Description:
 14                 The /sys/class/mtd/mtd{0,1,2,3     14                 The /sys/class/mtd/mtd{0,1,2,3,...} directories correspond
 15                 to each /dev/mtdX character de     15                 to each /dev/mtdX character device.  These may represent
 16                 physical/simulated flash devic     16                 physical/simulated flash devices, partitions on a flash
 17                 device, or concatenated flash      17                 device, or concatenated flash devices.
 18                                                    18 
 19 What:           /sys/class/mtd/mtdXro/             19 What:           /sys/class/mtd/mtdXro/
 20 Date:           April 2009                         20 Date:           April 2009
 21 KernelVersion:  2.6.29                             21 KernelVersion:  2.6.29
 22 Contact:        linux-mtd@lists.infradead.org      22 Contact:        linux-mtd@lists.infradead.org
 23 Description:                                       23 Description:
 24                 These directories provide the      24                 These directories provide the corresponding read-only device
 25                 nodes for /sys/class/mtd/mtdX/     25                 nodes for /sys/class/mtd/mtdX/ .
 26                                                    26 
 27 What:           /sys/class/mtd/mtdX/dev            27 What:           /sys/class/mtd/mtdX/dev
 28 Date:           April 2009                         28 Date:           April 2009
 29 KernelVersion:  2.6.29                             29 KernelVersion:  2.6.29
 30 Contact:        linux-mtd@lists.infradead.org      30 Contact:        linux-mtd@lists.infradead.org
 31 Description:                                       31 Description:
 32                 Major and minor numbers of the     32                 Major and minor numbers of the character device corresponding
 33                 to this MTD device (in <major>     33                 to this MTD device (in <major>:<minor> format).  This is the
 34                 read-write device so <minor> w     34                 read-write device so <minor> will be even.
 35                                                    35 
 36 What:           /sys/class/mtd/mtdXro/dev          36 What:           /sys/class/mtd/mtdXro/dev
 37 Date:           April 2009                         37 Date:           April 2009
 38 KernelVersion:  2.6.29                             38 KernelVersion:  2.6.29
 39 Contact:        linux-mtd@lists.infradead.org      39 Contact:        linux-mtd@lists.infradead.org
 40 Description:                                       40 Description:
 41                 Major and minor numbers of the     41                 Major and minor numbers of the character device corresponding
 42                 to the read-only variant of th     42                 to the read-only variant of the MTD device (in
 43                 <major>:<minor> format).  In t     43                 <major>:<minor> format).  In this case <minor> will be odd.
 44                                                    44 
 45 What:           /sys/class/mtd/mtdX/erasesize      45 What:           /sys/class/mtd/mtdX/erasesize
 46 Date:           April 2009                         46 Date:           April 2009
 47 KernelVersion:  2.6.29                             47 KernelVersion:  2.6.29
 48 Contact:        linux-mtd@lists.infradead.org      48 Contact:        linux-mtd@lists.infradead.org
 49 Description:                                       49 Description:
 50                 "Major" erase size for the dev     50                 "Major" erase size for the device.  If numeraseregions is
 51                 zero, this is the eraseblock s     51                 zero, this is the eraseblock size for the entire device.
 52                 Otherwise, the MEMGETREGIONCOU     52                 Otherwise, the MEMGETREGIONCOUNT/MEMGETREGIONINFO ioctls
 53                 can be used to determine the a     53                 can be used to determine the actual eraseblock layout.
 54                                                    54 
 55 What:           /sys/class/mtd/mtdX/flags          55 What:           /sys/class/mtd/mtdX/flags
 56 Date:           April 2009                         56 Date:           April 2009
 57 KernelVersion:  2.6.29                             57 KernelVersion:  2.6.29
 58 Contact:        linux-mtd@lists.infradead.org      58 Contact:        linux-mtd@lists.infradead.org
 59 Description:                                       59 Description:
 60                 A hexadecimal value representi     60                 A hexadecimal value representing the device flags, ORed
 61                 together:                          61                 together:
 62                                                    62 
 63                 0x0400: MTD_WRITEABLE - device     63                 0x0400: MTD_WRITEABLE - device is writable
 64                 0x0800: MTD_BIT_WRITEABLE - si     64                 0x0800: MTD_BIT_WRITEABLE - single bits can be flipped
 65                 0x1000: MTD_NO_ERASE - no eras     65                 0x1000: MTD_NO_ERASE - no erase necessary
 66                 0x2000: MTD_POWERUP_LOCK - alw     66                 0x2000: MTD_POWERUP_LOCK - always locked after reset
 67                                                    67 
 68 What:           /sys/class/mtd/mtdX/name           68 What:           /sys/class/mtd/mtdX/name
 69 Date:           April 2009                         69 Date:           April 2009
 70 KernelVersion:  2.6.29                             70 KernelVersion:  2.6.29
 71 Contact:        linux-mtd@lists.infradead.org      71 Contact:        linux-mtd@lists.infradead.org
 72 Description:                                       72 Description:
 73                 A human-readable ASCII name fo     73                 A human-readable ASCII name for the device or partition.
 74                 This will match the name in /p     74                 This will match the name in /proc/mtd .
 75                                                    75 
 76 What:           /sys/class/mtd/mtdX/numerasere     76 What:           /sys/class/mtd/mtdX/numeraseregions
 77 Date:           April 2009                         77 Date:           April 2009
 78 KernelVersion:  2.6.29                             78 KernelVersion:  2.6.29
 79 Contact:        linux-mtd@lists.infradead.org      79 Contact:        linux-mtd@lists.infradead.org
 80 Description:                                       80 Description:
 81                 For devices that have variable     81                 For devices that have variable eraseblock sizes, this
 82                 provides the total number of e     82                 provides the total number of erase regions.  Otherwise,
 83                 it will read back as zero.         83                 it will read back as zero.
 84                                                    84 
 85 What:           /sys/class/mtd/mtdX/oobsize        85 What:           /sys/class/mtd/mtdX/oobsize
 86 Date:           April 2009                         86 Date:           April 2009
 87 KernelVersion:  2.6.29                             87 KernelVersion:  2.6.29
 88 Contact:        linux-mtd@lists.infradead.org      88 Contact:        linux-mtd@lists.infradead.org
 89 Description:                                       89 Description:
 90                 Number of OOB bytes per page.      90                 Number of OOB bytes per page.
 91                                                    91 
 92 What:           /sys/class/mtd/mtdX/size           92 What:           /sys/class/mtd/mtdX/size
 93 Date:           April 2009                         93 Date:           April 2009
 94 KernelVersion:  2.6.29                             94 KernelVersion:  2.6.29
 95 Contact:        linux-mtd@lists.infradead.org      95 Contact:        linux-mtd@lists.infradead.org
 96 Description:                                       96 Description:
 97                 Total size of the device/parti     97                 Total size of the device/partition, in bytes.
 98                                                    98 
 99 What:           /sys/class/mtd/mtdX/type           99 What:           /sys/class/mtd/mtdX/type
100 Date:           April 2009                        100 Date:           April 2009
101 KernelVersion:  2.6.29                            101 KernelVersion:  2.6.29
102 Contact:        linux-mtd@lists.infradead.org     102 Contact:        linux-mtd@lists.infradead.org
103 Description:                                      103 Description:
104                 One of the following ASCII str    104                 One of the following ASCII strings, representing the device
105                 type:                             105                 type:
106                                                   106 
107                 absent, ram, rom, nor, nand, m    107                 absent, ram, rom, nor, nand, mlc-nand, dataflash, ubi, unknown
108                                                   108 
109 What:           /sys/class/mtd/mtdX/writesize     109 What:           /sys/class/mtd/mtdX/writesize
110 Date:           April 2009                        110 Date:           April 2009
111 KernelVersion:  2.6.29                            111 KernelVersion:  2.6.29
112 Contact:        linux-mtd@lists.infradead.org     112 Contact:        linux-mtd@lists.infradead.org
113 Description:                                      113 Description:
114                 Minimal writable flash unit si    114                 Minimal writable flash unit size.  This will always be
115                 a positive integer.               115                 a positive integer.
116                                                   116 
117                 In the case of NOR flash it is    117                 In the case of NOR flash it is 1 (even though individual
118                 bits can be cleared).             118                 bits can be cleared).
119                                                   119 
120                 In the case of NAND flash it i    120                 In the case of NAND flash it is one NAND page (or a
121                 half page, or a quarter page).    121                 half page, or a quarter page).
122                                                   122 
123                 In the case of ECC NOR, it is     123                 In the case of ECC NOR, it is the ECC block size.
124                                                   124 
125 What:           /sys/class/mtd/mtdX/ecc_streng    125 What:           /sys/class/mtd/mtdX/ecc_strength
126 Date:           April 2012                        126 Date:           April 2012
127 KernelVersion:  3.4                               127 KernelVersion:  3.4
128 Contact:        linux-mtd@lists.infradead.org     128 Contact:        linux-mtd@lists.infradead.org
129 Description:                                      129 Description:
130                 Maximum number of bit errors t    130                 Maximum number of bit errors that the device is capable of
131                 correcting within each region     131                 correcting within each region covering an ECC step (see
132                 ecc_step_size).  This will alw    132                 ecc_step_size).  This will always be a non-negative integer.
133                                                   133 
134                 In the case of devices lacking    134                 In the case of devices lacking any ECC capability, it is 0.
135                                                   135 
136 What:           /sys/class/mtd/mtdX/bitflip_th    136 What:           /sys/class/mtd/mtdX/bitflip_threshold
137 Date:           April 2012                        137 Date:           April 2012
138 KernelVersion:  3.4                               138 KernelVersion:  3.4
139 Contact:        linux-mtd@lists.infradead.org     139 Contact:        linux-mtd@lists.infradead.org
140 Description:                                      140 Description:
141                 This allows the user to examin    141                 This allows the user to examine and adjust the criteria by which
142                 mtd returns -EUCLEAN from mtd_    142                 mtd returns -EUCLEAN from mtd_read() and mtd_read_oob().  If the
143                 maximum number of bit errors t    143                 maximum number of bit errors that were corrected on any single
144                 region comprising an ecc step     144                 region comprising an ecc step (as reported by the driver) equals
145                 or exceeds this value, -EUCLEA    145                 or exceeds this value, -EUCLEAN is returned.  Otherwise, absent
146                 an error, 0 is returned.  High    146                 an error, 0 is returned.  Higher layers (e.g., UBI) use this
147                 return code as an indication t    147                 return code as an indication that an erase block may be
148                 degrading and should be scruti    148                 degrading and should be scrutinized as a candidate for being
149                 marked as bad.                    149                 marked as bad.
150                                                   150 
151                 The initial value may be speci    151                 The initial value may be specified by the flash device driver.
152                 If not, then the default value    152                 If not, then the default value is ecc_strength.
153                                                   153 
154                 The introduction of this featu    154                 The introduction of this feature brings a subtle change to the
155                 meaning of the -EUCLEAN return    155                 meaning of the -EUCLEAN return code.  Previously, it was
156                 interpreted to mean simply "on    156                 interpreted to mean simply "one or more bit errors were
157                 corrected".  Its new interpret    157                 corrected".  Its new interpretation can be phrased as "a
158                 dangerously high number of bit    158                 dangerously high number of bit errors were corrected on one or
159                 more regions comprising an ecc    159                 more regions comprising an ecc step".  The precise definition of
160                 "dangerously high" can be adju    160                 "dangerously high" can be adjusted by the user with
161                 bitflip_threshold.  Users are     161                 bitflip_threshold.  Users are discouraged from doing this,
162                 however, unless they know what    162                 however, unless they know what they are doing and have intimate
163                 knowledge of the properties of    163                 knowledge of the properties of their device.  Broadly speaking,
164                 bitflip_threshold should be lo    164                 bitflip_threshold should be low enough to detect genuine erase
165                 block degradation, but high en    165                 block degradation, but high enough to avoid the consequences of
166                 a persistent return value of -    166                 a persistent return value of -EUCLEAN on devices where sticky
167                 bitflips occur.  Note that if     167                 bitflips occur.  Note that if bitflip_threshold exceeds
168                 ecc_strength, -EUCLEAN is neve    168                 ecc_strength, -EUCLEAN is never returned by the read operations.
169                 Conversely, if bitflip_thresho    169                 Conversely, if bitflip_threshold is zero, -EUCLEAN is always
170                 returned, absent a hard error.    170                 returned, absent a hard error.
171                                                   171 
172                 This is generally applicable o    172                 This is generally applicable only to NAND flash devices with ECC
173                 capability.  It is ignored on     173                 capability.  It is ignored on devices lacking ECC capability;
174                 i.e., devices for which ecc_st    174                 i.e., devices for which ecc_strength is zero.
175                                                   175 
176 What:           /sys/class/mtd/mtdX/ecc_step_s    176 What:           /sys/class/mtd/mtdX/ecc_step_size
177 Date:           May 2013                          177 Date:           May 2013
178 KernelVersion:  3.10                              178 KernelVersion:  3.10
179 Contact:        linux-mtd@lists.infradead.org     179 Contact:        linux-mtd@lists.infradead.org
180 Description:                                      180 Description:
181                 The size of a single region co    181                 The size of a single region covered by ECC, known as the ECC
182                 step.  Devices may have severa    182                 step.  Devices may have several equally sized ECC steps within
183                 each writesize region.            183                 each writesize region.
184                                                   184 
185                 It will always be a non-negati    185                 It will always be a non-negative integer.  In the case of
186                 devices lacking any ECC capabi    186                 devices lacking any ECC capability, it is 0.
187                                                   187 
188 What:           /sys/class/mtd/mtdX/ecc_failur    188 What:           /sys/class/mtd/mtdX/ecc_failures
189 Date:           June 2014                         189 Date:           June 2014
190 KernelVersion:  3.17                              190 KernelVersion:  3.17
191 Contact:        linux-mtd@lists.infradead.org     191 Contact:        linux-mtd@lists.infradead.org
192 Description:                                      192 Description:
193                 The number of failures reporte    193                 The number of failures reported by this device's ECC. Typically,
194                 these failures are associated     194                 these failures are associated with failed read operations.
195                                                   195 
196                 It will always be a non-negati    196                 It will always be a non-negative integer.  In the case of
197                 devices lacking any ECC capabi    197                 devices lacking any ECC capability, it is 0.
198                                                   198 
199 What:           /sys/class/mtd/mtdX/corrected_    199 What:           /sys/class/mtd/mtdX/corrected_bits
200 Date:           June 2014                         200 Date:           June 2014
201 KernelVersion:  3.17                              201 KernelVersion:  3.17
202 Contact:        linux-mtd@lists.infradead.org     202 Contact:        linux-mtd@lists.infradead.org
203 Description:                                      203 Description:
204                 The number of bits that have b    204                 The number of bits that have been corrected by means of the
205                 device's ECC.                     205                 device's ECC.
206                                                   206 
207                 It will always be a non-negati    207                 It will always be a non-negative integer.  In the case of
208                 devices lacking any ECC capabi    208                 devices lacking any ECC capability, it is 0.
209                                                   209 
210 What:           /sys/class/mtd/mtdX/bad_blocks    210 What:           /sys/class/mtd/mtdX/bad_blocks
211 Date:           June 2014                         211 Date:           June 2014
212 KernelVersion:  3.17                              212 KernelVersion:  3.17
213 Contact:        linux-mtd@lists.infradead.org     213 Contact:        linux-mtd@lists.infradead.org
214 Description:                                      214 Description:
215                 The number of blocks marked as    215                 The number of blocks marked as bad, if any, in this partition.
216                                                   216 
217 What:           /sys/class/mtd/mtdX/bbt_blocks    217 What:           /sys/class/mtd/mtdX/bbt_blocks
218 Date:           June 2014                         218 Date:           June 2014
219 KernelVersion:  3.17                              219 KernelVersion:  3.17
220 Contact:        linux-mtd@lists.infradead.org     220 Contact:        linux-mtd@lists.infradead.org
221 Description:                                      221 Description:
222                 The number of blocks that are     222                 The number of blocks that are marked as reserved, if any, in
223                 this partition. These are typi    223                 this partition. These are typically used to store the in-flash
224                 bad block table (BBT).            224                 bad block table (BBT).
225                                                   225 
226 What:           /sys/class/mtd/mtdX/offset        226 What:           /sys/class/mtd/mtdX/offset
227 Date:           March 2015                        227 Date:           March 2015
228 KernelVersion:  4.1                               228 KernelVersion:  4.1
229 Contact:        linux-mtd@lists.infradead.org     229 Contact:        linux-mtd@lists.infradead.org
230 Description:                                      230 Description:
231                 For a partition, the offset of    231                 For a partition, the offset of that partition from the start
232                 of the parent (another partiti    232                 of the parent (another partition or a flash device) in bytes.
233                 This attribute is absent on fl    233                 This attribute is absent on flash devices, so it can be used
234                 to distinguish them from parti    234                 to distinguish them from partitions.
235                                                   235 
236 What:           /sys/class/mtd/mtdX/oobavail      236 What:           /sys/class/mtd/mtdX/oobavail
237 Date:           April 2018                        237 Date:           April 2018
238 KernelVersion:  4.16                              238 KernelVersion:  4.16
239 Contact:        linux-mtd@lists.infradead.org     239 Contact:        linux-mtd@lists.infradead.org
240 Description:                                      240 Description:
241                 Number of bytes available for     241                 Number of bytes available for a client to place data into
242                 the out of band area.             242                 the out of band area.
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php