mtd utilities work but ubi utilities do not?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I have a curious issue that I cannot explain: I am able to read and write to my NAND (MT29F8G08ABABAWP) with "flash_erase /dev/mtd7 0 2048" and "nandtest /dev/mtd7" but "ubiformat /dev/mtd7" and "ubiattach -p /dev/mtd7" do not work for me.

So my basic question is why would the mdt utilities work and the ubi utilities not?

Even though nandtest seems to work fine I have included its output. As you can see it even finds and corrects the occasional ECC error. What I find interesting however is that the there are several thousand ECC errors that occurred before nandtest was run(due to ubiformat and ubiattach), but not a single one was correctable.

Output of "nandtest /dev/mtd7":
ECC corrections: 0
ECC failures   : 4041
Bad blocks     : 0
BBT blocks     : 0
06100000: reading (1 of 1)...
 1 bit(s) ECC corrected at 06100000
0b900000: reading (1 of 1)...

Also here is the output of "mtdinfo /dev/mtd7":
mtd7
Name:                           rootfs_data
Type:                           nand
Eraseblock size:                524288 bytes, 512.0 KiB
Amount of eraseblocks:          2048 (1073741824 bytes, 1024.0 MiB)
Minimum input/output unit size: 4096 bytes
Sub-page size:                  1024 bytes
OOB size:                       224 bytes
Character device major/minor:   90:14
Bad blocks are allowed:         true
Device is writable:             true


Here is where the trouble begins...

When I "ubiformat /dev/mtd7" it works the first time with no errors, but the same command generates "[  276.517513] ecc unrecoverable erro" on dmesg for all subsequent runs of "ubiformat /dev/mtd7". Further when I try "ubiattach -p /dev/mtd7" I get the following error for every PEB in the device.

dmesg output of "ubiformat /dev/mtd7"(2nd, 3rd run etc):
[  276.517513] ecc unrecoverable erro

Output of "ubiattach -p /dev/mtd7":
Errors begin with first PEB.
...
...
...
[  419.917998] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 2047:0, read only 64 bytes, retry
[  419.919060] ecc unrecoverable error
[  419.922696] ubi0 warning: ubi_io_read: error -77 (ECC error) while reading 64 bytes from PEB 2047:1024, read only 64 bytes, retry
[  419.923107] ubi0: scanning is finished
[  419.954179] ubi0: attached mtd7 (name "rootfs_data", size 1024 MiB)
[  419.954205] ubi0: PEB size: 524288 bytes (512 KiB), LEB size: 520192 bytes
[  419.954217] ubi0: min./max. I/O unit sizes: 4096/4096, sub-page size 1024
[  419.954229] ubi0: VID header offset: 1024 (aligned 1024), data offset: 4096
[  419.954240] ubi0: good PEBs: 2048, bad PEBs: 0, corrupted PEBs: 0
[  419.954252] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
[  419.954268] ubi0: max/mean erase counter: 1/1, WL threshold: 4096, image sequence number: 1850455827
[  419.954282] ubi0: available PEBs: 2004, total reserved PEBs: 44, PEBs reserved for bad PEB handling: 40
[  419.958108] ubi0: background thread "ubi_bgt0d" started, PID 74

Why would the mtd utilities work and the UBI utilities not?

Respectfully,
Matt Schepers

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux