brintos

brintos / linux-shallow public Read only

0
0
Text · 7.9 KiB · f77fa4f Raw
243 lines · plain
1What:		/sys/class/mtd/2Date:		April 20093KernelVersion:	2.6.294Contact:	linux-mtd@lists.infradead.org5Description:6		The mtd/ class subdirectory belongs to the MTD subsystem7		(MTD core).8 9What:		/sys/class/mtd/mtdX/10Date:		April 200911KernelVersion:	2.6.2912Contact:	linux-mtd@lists.infradead.org13Description:14		The /sys/class/mtd/mtd{0,1,2,3,...} directories correspond15		to each /dev/mtdX character device.  These may represent16		physical/simulated flash devices, partitions on a flash17		device, or concatenated flash devices.18 19What:		/sys/class/mtd/mtdXro/20Date:		April 200921KernelVersion:	2.6.2922Contact:	linux-mtd@lists.infradead.org23Description:24		These directories provide the corresponding read-only device25		nodes for /sys/class/mtd/mtdX/ .26 27What:		/sys/class/mtd/mtdX/dev28Date:		April 200929KernelVersion:	2.6.2930Contact:	linux-mtd@lists.infradead.org31Description:32		Major and minor numbers of the character device corresponding33		to this MTD device (in <major>:<minor> format).  This is the34		read-write device so <minor> will be even.35 36What:		/sys/class/mtd/mtdXro/dev37Date:		April 200938KernelVersion:	2.6.2939Contact:	linux-mtd@lists.infradead.org40Description:41		Major and minor numbers of the character device corresponding42		to the read-only variant of the MTD device (in43		<major>:<minor> format).  In this case <minor> will be odd.44 45What:		/sys/class/mtd/mtdX/erasesize46Date:		April 200947KernelVersion:	2.6.2948Contact:	linux-mtd@lists.infradead.org49Description:50		"Major" erase size for the device.  If numeraseregions is51		zero, this is the eraseblock size for the entire device.52		Otherwise, the MEMGETREGIONCOUNT/MEMGETREGIONINFO ioctls53		can be used to determine the actual eraseblock layout.54 55What:		/sys/class/mtd/mtdX/flags56Date:		April 200957KernelVersion:	2.6.2958Contact:	linux-mtd@lists.infradead.org59Description:60		A hexadecimal value representing the device flags, ORed61		together:62 63		0x0400: MTD_WRITEABLE - device is writable64		0x0800: MTD_BIT_WRITEABLE - single bits can be flipped65		0x1000: MTD_NO_ERASE - no erase necessary66		0x2000: MTD_POWERUP_LOCK - always locked after reset67 68What:		/sys/class/mtd/mtdX/name69Date:		April 200970KernelVersion:	2.6.2971Contact:	linux-mtd@lists.infradead.org72Description:73		A human-readable ASCII name for the device or partition.74		This will match the name in /proc/mtd .75 76What:		/sys/class/mtd/mtdX/numeraseregions77Date:		April 200978KernelVersion:	2.6.2979Contact:	linux-mtd@lists.infradead.org80Description:81		For devices that have variable eraseblock sizes, this82		provides the total number of erase regions.  Otherwise,83		it will read back as zero.84 85What:		/sys/class/mtd/mtdX/oobsize86Date:		April 200987KernelVersion:	2.6.2988Contact:	linux-mtd@lists.infradead.org89Description:90		Number of OOB bytes per page.91 92What:		/sys/class/mtd/mtdX/size93Date:		April 200994KernelVersion:	2.6.2995Contact:	linux-mtd@lists.infradead.org96Description:97		Total size of the device/partition, in bytes.98 99What:		/sys/class/mtd/mtdX/type100Date:		April 2009101KernelVersion:	2.6.29102Contact:	linux-mtd@lists.infradead.org103Description:104		One of the following ASCII strings, representing the device105		type:106 107		absent, ram, rom, nor, nand, mlc-nand, dataflash, ubi, unknown108 109What:		/sys/class/mtd/mtdX/writesize110Date:		April 2009111KernelVersion:	2.6.29112Contact:	linux-mtd@lists.infradead.org113Description:114		Minimal writable flash unit size.  This will always be115		a positive integer.116 117		In the case of NOR flash it is 1 (even though individual118		bits can be cleared).119 120		In the case of NAND flash it is one NAND page (or a121		half page, or a quarter page).122 123		In the case of ECC NOR, it is the ECC block size.124 125What:		/sys/class/mtd/mtdX/ecc_strength126Date:		April 2012127KernelVersion:	3.4128Contact:	linux-mtd@lists.infradead.org129Description:130		Maximum number of bit errors that the device is capable of131		correcting within each region covering an ECC step (see132		ecc_step_size).  This will always be a non-negative integer.133 134		In the case of devices lacking any ECC capability, it is 0.135 136What:		/sys/class/mtd/mtdX/bitflip_threshold137Date:		April 2012138KernelVersion:	3.4139Contact:	linux-mtd@lists.infradead.org140Description:141		This allows the user to examine and adjust the criteria by which142		mtd returns -EUCLEAN from mtd_read() and mtd_read_oob().  If the143		maximum number of bit errors that were corrected on any single144		region comprising an ecc step (as reported by the driver) equals145		or exceeds this value, -EUCLEAN is returned.  Otherwise, absent146		an error, 0 is returned.  Higher layers (e.g., UBI) use this147		return code as an indication that an erase block may be148		degrading and should be scrutinized as a candidate for being149		marked as bad.150 151		The initial value may be specified by the flash device driver.152		If not, then the default value is ecc_strength.153 154		The introduction of this feature brings a subtle change to the155		meaning of the -EUCLEAN return code.  Previously, it was156		interpreted to mean simply "one or more bit errors were157		corrected".  Its new interpretation can be phrased as "a158		dangerously high number of bit errors were corrected on one or159		more regions comprising an ecc step".  The precise definition of160		"dangerously high" can be adjusted by the user with161		bitflip_threshold.  Users are discouraged from doing this,162		however, unless they know what they are doing and have intimate163		knowledge of the properties of their device.  Broadly speaking,164		bitflip_threshold should be low enough to detect genuine erase165		block degradation, but high enough to avoid the consequences of166		a persistent return value of -EUCLEAN on devices where sticky167		bitflips occur.  Note that if bitflip_threshold exceeds168		ecc_strength, -EUCLEAN is never returned by the read operations.169		Conversely, if bitflip_threshold is zero, -EUCLEAN is always170		returned, absent a hard error.171 172		This is generally applicable only to NAND flash devices with ECC173		capability.  It is ignored on devices lacking ECC capability;174		i.e., devices for which ecc_strength is zero.175 176What:		/sys/class/mtd/mtdX/ecc_step_size177Date:		May 2013178KernelVersion:	3.10179Contact:	linux-mtd@lists.infradead.org180Description:181		The size of a single region covered by ECC, known as the ECC182		step.  Devices may have several equally sized ECC steps within183		each writesize region.184 185		It will always be a non-negative integer.  In the case of186		devices lacking any ECC capability, it is 0.187 188What:		/sys/class/mtd/mtdX/ecc_failures189Date:		June 2014190KernelVersion:	3.17191Contact:	linux-mtd@lists.infradead.org192Description:193		The number of failures reported by this device's ECC. Typically,194		these failures are associated with failed read operations.195 196		It will always be a non-negative integer.  In the case of197		devices lacking any ECC capability, it is 0.198 199What:		/sys/class/mtd/mtdX/corrected_bits200Date:		June 2014201KernelVersion:	3.17202Contact:	linux-mtd@lists.infradead.org203Description:204		The number of bits that have been corrected by means of the205		device's ECC.206 207		It will always be a non-negative integer.  In the case of208		devices lacking any ECC capability, it is 0.209 210What:		/sys/class/mtd/mtdX/bad_blocks211Date:		June 2014212KernelVersion:	3.17213Contact:	linux-mtd@lists.infradead.org214Description:215		The number of blocks marked as bad, if any, in this partition.216 217What:		/sys/class/mtd/mtdX/bbt_blocks218Date:		June 2014219KernelVersion:	3.17220Contact:	linux-mtd@lists.infradead.org221Description:222		The number of blocks that are marked as reserved, if any, in223		this partition. These are typically used to store the in-flash224		bad block table (BBT).225 226What:		/sys/class/mtd/mtdX/offset227Date:		March 2015228KernelVersion:	4.1229Contact:	linux-mtd@lists.infradead.org230Description:231		For a partition, the offset of that partition from the start232		of the parent (another partition or a flash device) in bytes.233		This attribute is absent on flash devices, so it can be used234		to distinguish them from partitions.235 236What:		/sys/class/mtd/mtdX/oobavail237Date:		April 2018238KernelVersion:	4.16239Contact:	linux-mtd@lists.infradead.org240Description:241		Number of bytes available for a client to place data into242		the out of band area.243