
Hi Tim,
Am 16.03.22 um 17:34 schrieb Tim Harvey:
On Wed, Mar 16, 2022 at 7:09 AM Fabio Estevam festevam@gmail.com wrote:
Adding Han Xu's NXP email on Cc.
On Mon, Mar 14, 2022 at 10:31 AM Frieder Schrempf frieder.schrempf@kontron.de wrote:
Hello everyone,
sorry to dig out an old thread, but the below patch which was applied upstream as 616f03dabacb causes a regression for me when trying to attach an UBI volume with U-Boot 2022.01 on a board with i.MX6 Solo and AMD/Spansion parallel NAND.
The failure looks like this:
ubi0: attaching mtd2 ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes ubi0 error: ubi_io_read: error -74 (ECC error) while reading 2048 bytes from PEB 0:2048, read 2048 bytes ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read 64 bytes ubi0 error: ubi_io_read: error -74 (ECC error) while reading 2048 bytes from PEB 1:2048, read 2048 bytes
The NAND as reported by Linux is:
nand: device found, Manufacturer ID: 0x01, Chip ID: 0xdc nand: AMD/Spansion S34ML04G1 nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
A different revision of the same board with a different NAND from manufacturer ESMT doesn't show the issue:
nand: device found, Manufacturer ID: 0xc8, Chip ID: 0xdc nand: ESMT NAND 512MiB 3,3V 8-bit nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
When I revert the mentioned commit (see patch here: [1]), the UBI boot starts working again.
Does anyone know what the problem is and how to properly solve it?
Thanks for any help! Frieder
[1] https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fzerobin.ne...
Frieder,
I see the same issue here with IMX6Q/DL GPMI NAND.
If I re-flash the ubi within U-Boot (tftpboot $loadaddr rootfs.ubi && nand erase.part rootfs && nand write $loadaddr rootfs $filesize) I find that U-Boot can attach and mount the ubi fine but Linux will have issues
Interesting! This sounds like U-Boot and Linux somehow diverge in how they handle the ECC data in OOB. I'm pretty confident that Linux does things "correctly" and U-Boot should match what Linux does in this case.
Does the patch (revert of 616f03dabacb) I mentioned before "solve" the issue for your case, too?
@Han, Ye, Peng: As you signed-off the mentioned commit, do you have any ideas for a fix?
Thanks Frieder