[BUG v1.4.6] `mtdinfo -u' confused by some RAM MTD devices (with a "bad" erasesize?)

Brian Foster brian.foster at maxim-ic.com
Fri Mar 16 09:39:29 EDT 2012


Hello,

 I was showing a colleague the ‘mtdinfo -u’ option,
 and noticed some rather amusing output when querying
 a RAM-type MTD device.  This is mtd-utils v1.4.6 with
 a v2.6.36 kernel and our own driver for the device:
──────────────────────────────────────────────────────
# mtdinfo --version
1.1
# mtdinfo  -u /dev/mtd1
mtd1
Name:                           maximasp-nvram
Type:                           ram
Eraseblock size:                1 bytes
Amount of eraseblocks:          16384 (16384 bytes, 16.0 KiB)
Minimum input/output unit size: 1 byte
Sub-page size:                  1 byte
Character device major/minor:   90:2
Bad blocks are allowed:         false
Device is writable:             true
Default UBI VID header offset:  64
Default UBI data offset:        128
Default UBI LEB size:           -127 bytes
Maximum UBI volumes count:      128
# 
──────────────────────────────────────────────────────

 A “default UBI LEB size” of “-1 bytes” ?!

  ● I have not investigated any further.

  ● I haven't tried a later version of mtd-utils.

  ● I cannot rule the possibility of a bork in our
    driver (which is for special-purpose embedded
    NVRAM on our chip, and really is only 16KiB).

  ● I haven't tried the generic mtdram driver, but
    know its erasesize is always a multiple of 1KiB.

 And I seriously doubt we'd ever try to use UBI or
 UBIFS with this specialist 16KiB embedded NVRAM!

cheers!
	-blf-

-- 
Brian Foster
Principal MTS, Software        |  La Ciotat, France
Maxim Integrated Products      |  Web:  http://www.maxim-ic.com/


More information about the linux-mtd mailing list