ARM: BCM5301X: Fix NAND ECC parameters for Linksys Panamera
PATCH 1/1 ARM: BCM5301X: Fix NAND ECC parameters for Linksys Panamera
Using BCH8 gives ecc errors and makes the router unsuable. Switching to BCH1 fixes these errors.
--- arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/bcm47094-linksys-panamera.dts +1 -1
@@ -7,7 +7,7 @@ /dts-v1/; #include "bcm47094.dtsi" -#include "bcm5301x-nand-cs0-bch8.dtsi" +#include "bcm5301x-nand-cs0-bch1.dtsi" / { compatible = "linksys,panamera", "brcm,bcm47094", "brcm,bcm4708";
Signature · 1 line
2.11.0
Quoted 2 lines · Vivek Unune
Using BCH8 gives ecc errors and makes the router unsuable. Switching to BCH1 fixes these errors.
Can you provide CFE's log messages starting with "Decompressing...done" and up to the "Press Ctrl+C to stop in CFE" please? I'd like to see what NAND info CFE prints there.
Hi Rafa?,
Quoted 7 lines · Rafa? Mi?ecki
Quoted 2 lines · Vivek Unune
Using BCH8 gives ecc errors and makes the router unsuable. Switching to BCH1 fixes these errors.
Can you provide CFE's log messages starting with "Decompressing...done" and up to the "Press Ctrl+C to stop in CFE" please? I'd like to see what NAND info CFE prints there.
See below. It does say BCH-8, however I can't get it to work.
CFE log:
Decompressing...done
Found a Toshiba NAND flash:
Total size: 128MB Block size: 128KB Page Size: 2048B OOB Size: 64B Sector size: 512B Spare size: 16B ECC level: 8 (8-bit) Device ID: 0x98 0xf1 0x80 0x15 0xf2 0x16 find_devinfo: devinfo block found at 0x00180000!
Press Ctrl+C to stop in CFE
Thanks,
Vivek
Quoted 27 lines · Vivek Unune
Hi Rafa?,
Quoted 7 lines · Rafa? Mi?ecki
Quoted 2 lines · Vivek Unune
Using BCH8 gives ecc errors and makes the router unsuable. Switching to BCH1 fixes these errors.
Can you provide CFE's log messages starting with "Decompressing...done" and up to the "Press Ctrl+C to stop in CFE" please? I'd like to see what NAND info CFE prints there.
See below. It does say BCH-8, however I can't get it to work.
CFE log:
Decompressing...done
Found a Toshiba NAND flash:Total size: 128MB Block size: 128KB Page Size: 2048B OOB Size: 64B Sector size: 512B Spare size: 16B ECC level: 8 (8-bit) Device ID: 0x98 0xf1 0x80 0x15 0xf2 0x16 find_devinfo: devinfo block found at 0x00180000!
Quoted 1 line
Press Ctrl+C to stop in CFE
What kind of error are you getting in Linux with BCH-8?
Signature · 2 lines
-- Florian
Hi Florian,
Quoted 28 lines · Florian Fainelli
Quoted 27 lines · Vivek Unune
Hi Rafa?,
Quoted 7 lines · Rafa? Mi?ecki
Quoted 2 lines · Vivek Unune
Using BCH8 gives ecc errors and makes the router unsuable. Switching to BCH1 fixes these errors.
Can you provide CFE's log messages starting with "Decompressing...done" and up to the "Press Ctrl+C to stop in CFE" please? I'd like to see what NAND info CFE prints there.
See below. It does say BCH-8, however I can't get it to work.
CFE log:
Decompressing...done
Found a Toshiba NAND flash:Total size: 128MB Block size: 128KB Page Size: 2048B OOB Size: 64B Sector size: 512B Spare size: 16B ECC level: 8 (8-bit) Device ID: 0x98 0xf1 0x80 0x15 0xf2 0x16 find_devinfo: devinfo block found at 0x00180000!
Quoted 3 lines
Quoted 1 line
Press Ctrl+C to stop in CFE
What kind of error are you getting in Linux with BCH-8?
See below:
[ 12.941850] Generic PHY dsa-1.0:03: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-1.0:03, irq=POLL) [ 12.991851] Generic PHY dsa-1.0:04: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-1.0:04, irq=POLL) [ 13.032404] UBI: auto-attach mtd5 [ 13.035731] ubi0: attaching mtd5 [ 13.115701] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 113:0, read only 64 bytes, retry [ 13.127630] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 113:0, read only 64 bytes, retry [ 13.139524] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 113:0, read only 64 bytes, retry [ 13.151419] ubi0 error: 0xc037ca08: error -74 (ECC error) while reading 64 bytes from PEB 113:0, read 64 bytes [ 13.161448] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.25 #0 [ 13.167460] Hardware name: BCM5301X [ 13.170951] Backtrace: [ 13.173398] Function entered at [<c0105ccc>] from [<c0105fb4>] [ 13.179240] r7:00000000 r6:60000013 r5:00000000 r4:c081d988 [ 13.184903] Function entered at [<c0105f9c>] from [<c04f29a8>] [ 13.190744] Function entered at [<c04f2918>] from [<c037ca0c>] [ 13.196586] r7:00000000 r6:00000040 r5:c7954000 r4:ffffffb6 [ 13.202251] Function entered at [<c037c7dc>] from [<c037cd1c>] [ 13.208095] r10:00000000 r9:00000040 r8:00000071 r7:c7954000 r6:c7979000 r5:c7036180 [ 13.215941] r4:c7b72900 [ 13.218475] Function entered at [<c037cca4>] from [<c0381c5c>] [ 13.224318] r10:00000000 r9:c7979800 r8:c7954000 r7:c7979000 r6:00000071 r5:c7036180 [ 13.232157] r4:c7b72900 [ 13.234690] Function entered at [<c0381a84>] from [<c0376d74>] [ 13.240534] r10:c7954040 r9:00000840 r8:c702e400 r7:00000000 r6:c702e400 r5:c7954000 [ 13.248381] r4:fffff800 [ 13.250914] Function entered at [<c0376720>] from [<c0717b9c>] [ 13.256759] r10:c0813a88 r9:c0651c18 r8:c0651bec r7:c084ff48 r6:c081e440 r5:c7823ea4 [ 13.264605] r4:c702e400 [ 13.267139] Function entered at [<c0717954>] from [<c0101a8c>] [ 13.272983] r10:c072e83c r9:c07366b8 r8:c0717954 r7:c072e838 r6:c081e440 r5:00000000 [ 13.280830] r4:c0803c08 [ 13.283363] Function entered at [<c01019dc>] from [<c0700e38>] [ 13.289206] r9:c07366b8 r8:c0700594 r7:c072e838 r6:c081e440 r5:c081e440 r4:00000008 [ 13.296958] Function entered at [<c0700cf8>] from [<c0506adc>] [ 13.302802] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0506acc [ 13.310641] r4:00000000 [ 13.313175] Function entered at [<c0506acc>] from [<c0102788>] [ 13.319015] r5:c0506acc r4:00000000 [ 13.323289] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 114:0, read only 64 bytes, retry [ 13.335178] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 114:0, read only 64 bytes, retry [ 13.347066] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 114:0, read only 64 bytes, retry [ 13.358956] ubi0 error: 0xc037ca08: error -74 (ECC error) while reading 64 bytes from PEB 114:0, read 64 bytes [ 13.368989] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.25 #0 [ 13.375007] Hardware name: BCM5301X [ 13.378496] Backtrace: [ 13.380943] Function entered at [<c0105ccc>] from [<c0105fb4>] [ 13.386787] r7:00000000 r6:60000013 r5:00000000 r4:c081d988 [ 13.392450] Function entered at [<c0105f9c>] from [<c04f29a8>] [ 13.398291] Function entered at [<c04f2918>] from [<c037ca0c>] [ 13.404133] r7:00000000 r6:00000040 r5:c7954000 r4:ffffffb6 [ 13.409797] Function entered at [<c037c7dc>] from [<c037cd1c>] [ 13.415641] r10:00000000 r9:00000040 r8:00000072 r7:c7954000 r6:c7979000 r5:c7036180 [ 13.423488] r4:c7b72900 [ 13.426021] Function entered at [<c037cca4>] from [<c0381c5c>] [ 13.431865] r10:00000000 r9:c7979800 r8:c7954000 r7:c7979000 r6:00000072 r5:c7036180 [ 13.439704] r4:c7b72900 [ 13.442237] Function entered at [<c0381a84>] from [<c0376d74>] [ 13.448081] r10:c7954040 r9:00000840 r8:c702e400 r7:00000000 r6:c702e400 r5:c7954000 [ 13.455928] r4:fffff800 [ 13.458461] Function entered at [<c0376720>] from [<c0717b9c>] [ 13.464305] r10:c0813a88 r9:c0651c18 r8:c0651bec r7:c084ff48 r6:c081e440 r5:c7823ea4 [ 13.472152] r4:c702e400 [ 13.474685] Function entered at [<c0717954>] from [<c0101a8c>] [ 13.480529] r10:c072e83c r9:c07366b8 r8:c0717954 r7:c072e838 r6:c081e440 r5:00000000 [ 13.488376] r4:c0803c08 [ 13.490909] Function entered at [<c01019dc>] from [<c0700e38>] [ 13.496754] r9:c07366b8 r8:c0700594 r7:c072e838 r6:c081e440 r5:c081e440 r4:00000008 [ 13.504514] Function entered at [<c0700cf8>] from [<c0506adc>] [ 13.510358] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0506acc [ 13.518197] r4:00000000 [ 13.520730] Function entered at [<c0506acc>] from [<c0102788>] [ 13.526570] r5:c0506acc r4:00000000 [ 13.530863] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read only 64 bytes, retry [ 13.542763] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read only 64 bytes, retry [ 13.554659] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read only 64 bytes, retry [ 13.566548] ubi0 error: 0xc037ca08: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read 64 bytes [ 13.576574] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.25 #0 [ 13.582589] Hardware name: BCM5301X [ 13.586078] Backtrace: [ 13.588526] Function entered at [<c0105ccc>] from [<c0105fb4>] [ 13.594368] r7:00000000 r6:60000013 r5:00000000 r4:c081d988 [ 13.600032] Function entered at [<c0105f9c>] from [<c04f29a8>] [ 13.605872] Function entered at [<c04f2918>] from [<c037ca0c>] [ 13.611714] r7:00000000 r6:00000040 r5:c7954000 r4:ffffffb6 [ 13.617378] Function entered at [<c037c7dc>] from [<c037cd1c>] [ 13.623223] r10:00000000 r9:00000040 r8:00000073 r7:c7954000 r6:c7979000 r5:c7036180 [ 13.631071] r4:c7b72900 [ 13.633604] Function entered at [<c037cca4>] from [<c0381c5c>] [ 13.639447] r10:00000000 r9:c7979800 r8:c7954000 r7:c7979000 r6:00000073 r5:c7036180 [ 13.647286] r4:c7b72900 [ 13.649819] Function entered at [<c0381a84>] from [<c0376d74>] [ 13.655663] r10:c7954040 r9:00000840 r8:c702e400 r7:00000000 r6:c702e400 r5:c7954000 [ 13.663510] r4:fffff800 [ 13.666042] Function entered at [<c0376720>] from [<c0717b9c>] [ 13.671886] r10:c0813a88 r9:c0651c18 r8:c0651bec r7:c084ff48 r6:c081e440 r5:c7823ea4 [ 13.679725] r4:c702e400 [ 13.682258] Function entered at [<c0717954>] from [<c0101a8c>] [ 13.688103] r10:c072e83c r9:c07366b8 r8:c0717954 r7:c072e838 r6:c081e440 r5:00000000 [ 13.695949] r4:c0803c08 [ 13.698482] Function entered at [<c01019dc>] from [<c0700e38>] [ 13.704327] r9:c07366b8 r8:c0700594 r7:c072e838 r6:c081e440 r5:c081e440 r4:00000008 [ 13.712087] Function entered at [<c0700cf8>] from [<c0506adc>] [ 13.717930] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0506acc [ 13.725769] r4:00000000 [ 13.728303] Function entered at [<c0506acc>] from [<c0102788>] [ 13.734144] r5:c0506acc r4:00000000 [ 13.738425] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 116:0, read only 64 bytes, retry [ 13.750319] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 116:0, read only 64 bytes, retry [ 13.762213] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 116:0, read only 64 bytes, retry [ 13.774103] ubi0 error: 0xc037ca08: error -74 (ECC error) while reading 64 bytes from PEB 116:0, read 64 bytes [ 13.784130] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.25 #0
Thanks,
Vivek
Quoted 27 lines · Vivek Unune
Hi Rafa?,
Quoted 7 lines · Rafa? Mi?ecki
Quoted 2 lines · Vivek Unune
Using BCH8 gives ecc errors and makes the router unsuable. Switching to BCH1 fixes these errors.
Can you provide CFE's log messages starting with "Decompressing...done" and up to the "Press Ctrl+C to stop in CFE" please? I'd like to see what NAND info CFE prints there.
See below. It does say BCH-8, however I can't get it to work.
CFE log:
Decompressing...done
Found a Toshiba NAND flash:Total size: 128MB Block size: 128KB Page Size: 2048B OOB Size: 64B Sector size: 512B Spare size: 16B ECC level: 8 (8-bit) Device ID: 0x98 0xf1 0x80 0x15 0xf2 0x16 find_devinfo: devinfo block found at 0x00180000!
Quoted 1 line
Press Ctrl+C to stop in CFE
This means that:
1) Default mode for your NAND controller is BCH8 (setup at hw level)
2) CFE uses BCH8 when programming flash with provided firmware
For maximum compatibility DTS should describe ECC as using BCH8 and Linux should use BCH8.
I spent whole day yesterday experimenting with BCM47094 and NAND controller to understand your case better.
As crazy as it sounds, my NAND controller working in BCH4 mode is reading flash data programmed using BCH8 perfectly fine! I was testing & verifying that behavior multiple times for hours. It really works.
I noticed that on my BCM47094 board with CFE working in BCH8:
1) Flashing firmware with CFE results in using BCH8 (expected)
2) Linux with NAND controller in BCH4 can read flash data (unexpected!)
3) Writing flash data results in using BCH4
Above write test proves that NAND controller is really setup into BCH4 mode correctly. How is it possible it reads flash data programmed using BCH8 is out of my imagination.
Long story short I believe your patch is wrong. DTS should describe hardware and by default this board uses BCH8 (and so the bootloader). Current DTS is correct.
As it happens your patch doesn't break anything directly because of unexpected NAND controller behavior. It's just a matter of "luck" though due to some weird hardware behavior.
Signature · 1 line
Rafa?
Quoted 138 lines · Vivek Unune
Quoted 28 lines · Florian Fainelli
Quoted 27 lines · Vivek Unune
Hi Rafa?,
Quoted 7 lines · Rafa? Mi?ecki
Quoted 2 lines · Vivek Unune
Using BCH8 gives ecc errors and makes the router unsuable. Switching to BCH1 fixes these errors.
Can you provide CFE's log messages starting with "Decompressing...done" and up to the "Press Ctrl+C to stop in CFE" please? I'd like to see what NAND info CFE prints there.
See below. It does say BCH-8, however I can't get it to work.
CFE log:
Decompressing...done
Found a Toshiba NAND flash:Total size: 128MB Block size: 128KB Page Size: 2048B OOB Size: 64B Sector size: 512B Spare size: 16B ECC level: 8 (8-bit) Device ID: 0x98 0xf1 0x80 0x15 0xf2 0x16 find_devinfo: devinfo block found at 0x00180000!Quoted 3 lines
Quoted 1 line
Press Ctrl+C to stop in CFE
What kind of error are you getting in Linux with BCH-8?
See below:
[ 12.941850] Generic PHY dsa-1.0:03: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-1.0:03, irq=POLL) [ 12.991851] Generic PHY dsa-1.0:04: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-1.0:04, irq=POLL) [ 13.032404] UBI: auto-attach mtd5 [ 13.035731] ubi0: attaching mtd5 [ 13.115701] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 113:0, read only 64 bytes, retry [ 13.127630] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 113:0, read only 64 bytes, retry [ 13.139524] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 113:0, read only 64 bytes, retry [ 13.151419] ubi0 error: 0xc037ca08: error -74 (ECC error) while reading 64 bytes from PEB 113:0, read 64 bytes [ 13.161448] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.25 #0 [ 13.167460] Hardware name: BCM5301X [ 13.170951] Backtrace: [ 13.173398] Function entered at [<c0105ccc>] from [<c0105fb4>] [ 13.179240] r7:00000000 r6:60000013 r5:00000000 r4:c081d988 [ 13.184903] Function entered at [<c0105f9c>] from [<c04f29a8>] [ 13.190744] Function entered at [<c04f2918>] from [<c037ca0c>] [ 13.196586] r7:00000000 r6:00000040 r5:c7954000 r4:ffffffb6 [ 13.202251] Function entered at [<c037c7dc>] from [<c037cd1c>] [ 13.208095] r10:00000000 r9:00000040 r8:00000071 r7:c7954000 r6:c7979000 r5:c7036180 [ 13.215941] r4:c7b72900 [ 13.218475] Function entered at [<c037cca4>] from [<c0381c5c>] [ 13.224318] r10:00000000 r9:c7979800 r8:c7954000 r7:c7979000 r6:00000071 r5:c7036180 [ 13.232157] r4:c7b72900 [ 13.234690] Function entered at [<c0381a84>] from [<c0376d74>] [ 13.240534] r10:c7954040 r9:00000840 r8:c702e400 r7:00000000 r6:c702e400 r5:c7954000 [ 13.248381] r4:fffff800 [ 13.250914] Function entered at [<c0376720>] from [<c0717b9c>] [ 13.256759] r10:c0813a88 r9:c0651c18 r8:c0651bec r7:c084ff48 r6:c081e440 r5:c7823ea4 [ 13.264605] r4:c702e400 [ 13.267139] Function entered at [<c0717954>] from [<c0101a8c>] [ 13.272983] r10:c072e83c r9:c07366b8 r8:c0717954 r7:c072e838 r6:c081e440 r5:00000000 [ 13.280830] r4:c0803c08 [ 13.283363] Function entered at [<c01019dc>] from [<c0700e38>] [ 13.289206] r9:c07366b8 r8:c0700594 r7:c072e838 r6:c081e440 r5:c081e440 r4:00000008 [ 13.296958] Function entered at [<c0700cf8>] from [<c0506adc>] [ 13.302802] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0506acc [ 13.310641] r4:00000000 [ 13.313175] Function entered at [<c0506acc>] from [<c0102788>] [ 13.319015] r5:c0506acc r4:00000000 [ 13.323289] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 114:0, read only 64 bytes, retry [ 13.335178] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 114:0, read only 64 bytes, retry [ 13.347066] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 114:0, read only 64 bytes, retry [ 13.358956] ubi0 error: 0xc037ca08: error -74 (ECC error) while reading 64 bytes from PEB 114:0, read 64 bytes [ 13.368989] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.25 #0 [ 13.375007] Hardware name: BCM5301X [ 13.378496] Backtrace: [ 13.380943] Function entered at [<c0105ccc>] from [<c0105fb4>] [ 13.386787] r7:00000000 r6:60000013 r5:00000000 r4:c081d988 [ 13.392450] Function entered at [<c0105f9c>] from [<c04f29a8>] [ 13.398291] Function entered at [<c04f2918>] from [<c037ca0c>] [ 13.404133] r7:00000000 r6:00000040 r5:c7954000 r4:ffffffb6 [ 13.409797] Function entered at [<c037c7dc>] from [<c037cd1c>] [ 13.415641] r10:00000000 r9:00000040 r8:00000072 r7:c7954000 r6:c7979000 r5:c7036180 [ 13.423488] r4:c7b72900 [ 13.426021] Function entered at [<c037cca4>] from [<c0381c5c>] [ 13.431865] r10:00000000 r9:c7979800 r8:c7954000 r7:c7979000 r6:00000072 r5:c7036180 [ 13.439704] r4:c7b72900 [ 13.442237] Function entered at [<c0381a84>] from [<c0376d74>] [ 13.448081] r10:c7954040 r9:00000840 r8:c702e400 r7:00000000 r6:c702e400 r5:c7954000 [ 13.455928] r4:fffff800 [ 13.458461] Function entered at [<c0376720>] from [<c0717b9c>] [ 13.464305] r10:c0813a88 r9:c0651c18 r8:c0651bec r7:c084ff48 r6:c081e440 r5:c7823ea4 [ 13.472152] r4:c702e400 [ 13.474685] Function entered at [<c0717954>] from [<c0101a8c>] [ 13.480529] r10:c072e83c r9:c07366b8 r8:c0717954 r7:c072e838 r6:c081e440 r5:00000000 [ 13.488376] r4:c0803c08 [ 13.490909] Function entered at [<c01019dc>] from [<c0700e38>] [ 13.496754] r9:c07366b8 r8:c0700594 r7:c072e838 r6:c081e440 r5:c081e440 r4:00000008 [ 13.504514] Function entered at [<c0700cf8>] from [<c0506adc>] [ 13.510358] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0506acc [ 13.518197] r4:00000000 [ 13.520730] Function entered at [<c0506acc>] from [<c0102788>] [ 13.526570] r5:c0506acc r4:00000000 [ 13.530863] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read only 64 bytes, retry [ 13.542763] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read only 64 bytes, retry [ 13.554659] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read only 64 bytes, retry [ 13.566548] ubi0 error: 0xc037ca08: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read 64 bytes [ 13.576574] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.25 #0 [ 13.582589] Hardware name: BCM5301X [ 13.586078] Backtrace: [ 13.588526] Function entered at [<c0105ccc>] from [<c0105fb4>] [ 13.594368] r7:00000000 r6:60000013 r5:00000000 r4:c081d988 [ 13.600032] Function entered at [<c0105f9c>] from [<c04f29a8>] [ 13.605872] Function entered at [<c04f2918>] from [<c037ca0c>] [ 13.611714] r7:00000000 r6:00000040 r5:c7954000 r4:ffffffb6 [ 13.617378] Function entered at [<c037c7dc>] from [<c037cd1c>] [ 13.623223] r10:00000000 r9:00000040 r8:00000073 r7:c7954000 r6:c7979000 r5:c7036180 [ 13.631071] r4:c7b72900 [ 13.633604] Function entered at [<c037cca4>] from [<c0381c5c>] [ 13.639447] r10:00000000 r9:c7979800 r8:c7954000 r7:c7979000 r6:00000073 r5:c7036180 [ 13.647286] r4:c7b72900 [ 13.649819] Function entered at [<c0381a84>] from [<c0376d74>] [ 13.655663] r10:c7954040 r9:00000840 r8:c702e400 r7:00000000 r6:c702e400 r5:c7954000 [ 13.663510] r4:fffff800 [ 13.666042] Function entered at [<c0376720>] from [<c0717b9c>] [ 13.671886] r10:c0813a88 r9:c0651c18 r8:c0651bec r7:c084ff48 r6:c081e440 r5:c7823ea4 [ 13.679725] r4:c702e400 [ 13.682258] Function entered at [<c0717954>] from [<c0101a8c>] [ 13.688103] r10:c072e83c r9:c07366b8 r8:c0717954 r7:c072e838 r6:c081e440 r5:00000000 [ 13.695949] r4:c0803c08 [ 13.698482] Function entered at [<c01019dc>] from [<c0700e38>] [ 13.704327] r9:c07366b8 r8:c0700594 r7:c072e838 r6:c081e440 r5:c081e440 r4:00000008 [ 13.712087] Function entered at [<c0700cf8>] from [<c0506adc>] [ 13.717930] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0506acc
Quoted 8 lines
[ 13.725769] r4:00000000 [ 13.728303] Function entered at [<c0506acc>] from [<c0102788>] [ 13.734144] r5:c0506acc r4:00000000 [ 13.738425] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 116:0, read only 64 bytes, retry [ 13.750319] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 116:0, read only 64 bytes, retry [ 13.762213] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 116:0, read only 64 bytes, retry [ 13.774103] ubi0 error: 0xc037ca08: error -74 (ECC error) while reading 64 bytes from PEB 116:0, read 64 bytes [ 13.784130] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.25 #0
This is expected if you previously were using firmware programming flash in non-BCH8 mode. The main reason for what you're seeing is that when flashing image with CFE it doesn't erase all NAND pages.
If previously you were using firmware programming flash in BCH1 mode, it means that after flashing firmware using BCH8 you'll end up with mess in ECC.
Part of NAND flash programmed by CFE will use BCH8. Part of NAND flash that remained from previous fw will use BCH1. Linux will fail to read part of NAND flash from prev installation.
The cleanest solution: erase all NAND content of firmware partition before flashing firmware using BCH8.
The easiest solution: ignore all these "error -74 (ECC error) while reading" errors (they may last for few minutes!). I believe UBI should simply recreate all pages it couldn't access and once you wait long enough, all your NAND flash will be using BCH8.
Quoted 47 lines · Rafa? Mi?ecki
Quoted 26 lines
[ 13.530863] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read only 64 bytes, retry [ 13.542763] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read only 64 bytes, retry [ 13.554659] ubi0 warning: 0xc037c9e4: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read only 64 bytes, retry [ 13.566548] ubi0 error: 0xc037ca08: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read 64 bytes [ 13.576574] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.25 #0 [ 13.582589] Hardware name: BCM5301X [ 13.586078] Backtrace: [ 13.588526] Function entered at [<c0105ccc>] from [<c0105fb4>] [ 13.594368] r7:00000000 r6:60000013 r5:00000000 r4:c081d988 [ 13.600032] Function entered at [<c0105f9c>] from [<c04f29a8>] [ 13.605872] Function entered at [<c04f2918>] from [<c037ca0c>] [ 13.611714] r7:00000000 r6:00000040 r5:c7954000 r4:ffffffb6 [ 13.617378] Function entered at [<c037c7dc>] from [<c037cd1c>] [ 13.623223] r10:00000000 r9:00000040 r8:00000073 r7:c7954000 r6:c7979000 r5:c7036180 [ 13.631071] r4:c7b72900 [ 13.633604] Function entered at [<c037cca4>] from [<c0381c5c>] [ 13.639447] r10:00000000 r9:c7979800 r8:c7954000 r7:c7979000 r6:00000073 r5:c7036180 [ 13.647286] r4:c7b72900 [ 13.649819] Function entered at [<c0381a84>] from [<c0376d74>] [ 13.655663] r10:c7954040 r9:00000840 r8:c702e400 r7:00000000 r6:c702e400 r5:c7954000 [ 13.663510] r4:fffff800 [ 13.666042] Function entered at [<c0376720>] from [<c0717b9c>] [ 13.671886] r10:c0813a88 r9:c0651c18 r8:c0651bec r7:c084ff48 r6:c081e440 r5:c7823ea4 [ 13.679725] r4:c702e400 [ 13.682258] Function entered at [<c0717954>] from [<c0101a8c>] [ 13.688103] r10:c072e83c r9:c07366b8 r8:c0717954 r7:c072e838 r6:c081e440 r5:00000000Quoted 8 lines
[ 13.695949] r4:c0803c08 [ 13.698482] Function entered at [<c01019dc>] from [<c0700e38>] [ 13.704327] r9:c07366b8 r8:c0700594 r7:c072e838 r6:c081e440 r5:c081e440 r4:00000008 [ 13.712087] Function entered at [<c0700cf8>] from [<c0506adc>] [ 13.717930] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0506acc [ 13.725769] r4:00000000 [ 13.728303] Function entered at [<c0506acc>] from [<c0102788>] [ 13.734144] r5:c0506acc r4:00000000This is expected if you previously were using firmware programming flash in non-BCH8 mode. The main reason for what you're seeing is that when flashing image with CFE it doesn't erase all NAND pages.
If previously you were using firmware programming flash in BCH1 mode, it means that after flashing firmware using BCH8 you'll end up with mess in ECC.
Part of NAND flash programmed by CFE will use BCH8. Part of NAND flash that remained from previous fw will use BCH1. Linux will fail to read part of NAND flash from prev installation.
Quoted 7 lines
The cleanest solution: erase all NAND content of firmware partition before flashing firmware using BCH8.
The easiest solution: ignore all these "error -74 (ECC error) while reading" errors (they may last for few minutes!). I believe UBI should simply recreate all pages it couldn't access and once you wait long enough, all your NAND flash will be using BCH8.
Let me build the firmware with BCH-8 and wait it out. I'll report back my results.
Thanks,
Vivek
Quoted 9 lines · Vivek Unune
Quoted 5 lines · Rafa? Mi?ecki
The easiest solution: ignore all these "error -74 (ECC error) while reading" errors (they may last for few minutes!). I believe UBI should simply recreate all pages it couldn't access and once you wait long enough, all your NAND flash will be using BCH8.
Let me build the firmware with BCH-8 and wait it out. I'll report back my results.
I can confirm that BCH-8 indeed works after letting it run through those ECC errors.
Thanks!
Vivek
Quoted 8 lines · Vivek Unune
Quoted 7 lines · Vivek Unune
Quoted 5 lines · Rafa? Mi?ecki
The easiest solution: ignore all these "error -74 (ECC error) while reading" errors (they may last for few minutes!). I believe UBI should simply recreate all pages it couldn't access and once you wait long enough, all your NAND flash will be using BCH8.
Quoted 7 lines
Quoted 2 lines
Let me build the firmware with BCH-8 and wait it out. I'll report back my results.
I can confirm that BCH-8 indeed works after letting it run through those ECC errors.
Thanks!
Great, thanks! That controller behavior (reading BCH8 fine while working in BCH4 mode) is really confusing.
Signature · 1 line
Rafa?