Bug 85481
Summary: | ECC errors (EBADMSG) reading UBI fs | ||
---|---|---|---|
Product: | Drivers | Reporter: | Angelo (angelo70) |
Component: | Flash/Memory Technology Devices | Assignee: | David Woodhouse (dwmw2) |
Status: | NEW --- | ||
Severity: | normal | CC: | karl.beldan |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.16.2 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Angelo
2014-10-02 20:33:55 UTC
I did another sime test: 1) from U.Boot 2014.07, that should be aligned with recent kernel, U-Boot > ubi part rootfs UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: volume 0 ("rootfs") re-sized from 202 to 472 LEBs UBI: attached mtd1 to ubi0 UBI: MTD device name: "mtd=6" UBI: MTD device size: 60 MiB UBI: number of good PEBs: 480 UBI: number of bad PEBs: 0 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 0 UBI: total number of reserved PEBs: 480 UBI: number of PEBs reserved for bad PEB handling: 4 UBI: max/mean erase counter: 1/0 U-Boot > ubi info UBI: MTD device name: "mtd=6" UBI: MTD device size: 60 MiB UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: number of good PEBs: 480 UBI: number of bad PEBs: 0 UBI: smallest flash I/O unit: 2048 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI: max. allowed volumes: 128 UBI: wear-leveling threshold: 4096 UBI: number of internal volumes: 1 UBI: number of user volumes: 1 UBI: available PEBs: 0 UBI: total number of reserved PEBs: 480 UBI: number of PEBs reserved for bad PEB handling: 4 UBI: max/mean erase counter: 1/0 U-Boot > ubi part rootfs UBI: mtd1 is detached from ubi0 UBI: attaching mtd1 to ubi0 UBI: physical eraseblock size: 131072 bytes (128 KiB) UBI: logical eraseblock size: 129024 bytes UBI: smallest flash I/O unit: 2048 UBI: sub-page size: 512 UBI: VID header offset: 512 (aligned 512) UBI: data offset: 2048 UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 478:0, read 64 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 479:0, read 64 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 479:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 477:512, read 512 bytes UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 478:512, read 512 bytes So at second re-attach, error is there. This is the same behavior of the kernel, that at first attach seems to damage the image. Still investigating. And i confirm, the same to happen on kernel 3.16.2: Did this test: Let the kernel attach UBI volume on empty partition (nand erase.part done from u-boot). mmc0: host does not support reading read-only switch. assuming write-enable. mmc0: new high speed SDHC card at address 1234 mmcblk0: mmc0:1234 SA04G 3.63 GiB mmcblk0: p1 platform leds-gpio: Driver leds-gpio requests probe deferral looking .. list name davinci-mcbsp.0, my name davinci-pcm-audio looking .. list name snd-soc-dummy, my name davinci-pcm-audio barix-ipam390 barix-ipam390.0: ASoC: platform davinci-pcm-audio not registered platform barix-ipam390.0: Driver barix-ipam390 requests probe deferral UBI: scanning is finished UBI: empty MTD device detected UBI: attached mtd6 (name "rootfs", size 60 MiB) to ubi0 UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512 UBI: VID header offset: 512 (aligned 512), data offset: 2048 UBI: good PEBs: 480, bad PEBs: 0, corrupted PEBs: 0 UBI: user volume: 0, internal volumes: 1, max. volumes count: 128 UBI: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 2453409313 UBI: available PEBs: 456, total reserved PEBs: 24, PEBs reserved for bad PEB handling: 20 UBI: background thread "ubi_bgt0d" started, PID 994 ** looping here (for (;;)) after driver prijnt this message. ** Restart the kernel: ..... TCP: cubic registered NET: Registered protocol family 17 platform leds-gpio: Driver leds-gpio requests probe deferral barix-ipam390 barix-ipam390.0: ASoC: platform davinci-pcm-audio not registered platform barix-ipam390.0: Driver barix-ipam390 requests probe deferral UBI: attaching mtd6 to ubi0 UBI warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry UBI warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry mmc0: host does not support reading read-only switch. assuming write-enable. UBI warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry mmc0: new high speed SDHC card at address 1234 UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes mmcblk0: mmc0:1234 SA04G 3.63 GiB mmcblk0: p1 platform leds-gpio: Driver leds-gpio requests probe deferral ... Did still a check, left .ecclayout unset in my board.c, to let the default be used. Still, erased partition (empty), booted 2 times (with the for(;;) block, ) at second time i have same ecc errors. barix-ipam390 barix-ipam390.0: ASoC: platform davinci-pcm-audio not registered platform barix-ipam390.0: Driver barix-ipam390 requests probe deferral UBI: attaching mtd6 to ubi0 UBI warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry UBI warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry UBI warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read only 64 bytes, retry UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB UBI warning: ubi_io_read: error -74 (ECC error) while reading 512 bytes from PEB 0:512, read only 512 bytes, retry UBI warning: ubi_io_read: error -74 (ECC error) while reading 512 bytes from PEB 0:512, read only 512 bytes, retry UBI warning: ubi_io_read: error -74 (ECC error) while reading 512 bytes from PEB 0:512, read only 512 bytes, retry Disabling sub-pages write in nand_base.c i have the driver wrking properly. So this must be connected to the fact my nand(mt28f1g08abb) memory doesn't have 512B subpages. So mtd should detect it. https://lkml.org/lkml/2016/8/29/71 should fix that. |