nvmem: brcm_nvram: use buffered nvram data for cell values
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 26 lines · Willem-Jan de Hoog
On OpenWrt 22.03.3, Asus RT-AC88U does not boot anymore:
UBI: auto-attach mtd4
ubi0: attaching mtd4
ubi0 error:0xc04f0b3c: PEB 0 contains corrupted VID header, and thedata does not contain all 0xFFubi0 error:
0xc04f0b4c: this may be a non-UBI PEB or a severe VID
header corruption which requires manual inspectionThe problem seems to be that
brcm_nvram_readaccesses its (mapped) io memory. When doing so the correct data is read but after that the mtd/ubi process fails to work.The
bcm47xx_nvram.ccode has buffered the nvram data so the cells value can be read from there.v3:
- Export symbol for modules.
- No dependency onKconfig.v2:
- Fix the wrong author information.v1:
- arinc.unal: Improved patch subject and log
Quoted 6 lines
Willem-Jan de Hoog (2):
The bcm47xx code makes a copy of the NVRAM data in ram. Allow access
to this data so property values can be read using nvmem cell api.
The bcm47xx module has a copy of the NVRAM data in ram. When available
use this one instead of reading from io memory since it causes mtd/ubi to fail.
I believe you're supposed to put the subject of the patches here, keep that in mind for future contributions. No need to resubmit as this is just composition.
Arınç
Who's going to take this series?
Arınç
A message that is not in the archive (sent off-list or not yet received): e179c12f73a6035690e814b842f677bbb38f5c96.1675717472.git.wdehoog@exalondelft.nl
Re: [PATCH v3 2/2] nvmem: brcm_nvram: use bcm47xx buffered data
Quoted 4 lines · Willem-Jan de Hoog
From: Willem-Jan de Hoog <[email protected]>
The bcm47xx module has a copy of the NVRAM data in ram. When available, use this one instead of reading from io memory since it causes mtd/ubi to fail.
This doesn't explain anything. Why do we need that? If anything we should rather get rid of that NVRAM firmware driver. It was needed before we had all NVMEM stuff in place. Finally how can reading iomem break mtd/ubi?!
It seems like some hack instead of proper fix. Possibly because of lack of understanding the issue / some subsystem.
Re: [PATCH v3 2/2] nvmem: brcm_nvram: use bcm47xx buffered data
Quoted 10 lines · Rafał Miłecki
Quoted 4 lines · Willem-Jan de Hoog
From: Willem-Jan de Hoog <[email protected]>
The bcm47xx module has a copy of the NVRAM data in ram. When available, use this one instead of reading from io memory since it causes mtd/ubi to fail.
This doesn't explain anything. Why do we need that? If anything we should rather get rid of that NVRAM firmware driver. It was needed before we had all NVMEM stuff in place. Finally how can reading iomem break mtd/ubi?!
Did you take a look at the bootlog on this post on the thread, I've mentioned your user handle a few times but received no response on the forum.
https://forum.openwrt.org/t/asus-rt-ac88u-hw-a6-broken-in-22-03-3/147882/6?u=arinc9
Arınç
Re: [PATCH v3 2/2] nvmem: brcm_nvram: use bcm47xx buffered data
Quoted 7 lines · Arınç ÜNAL
Quoted 6 lines · Rafał Miłecki
Quoted 4 lines · Willem-Jan de Hoog
From: Willem-Jan de Hoog <[email protected]>
The bcm47xx module has a copy of the NVRAM data in ram. When available, use this one instead of reading from io memory since it causes mtd/ubi to fail.
Quoted 8 lines
Quoted 4 lines
This doesn't explain anything. Why do we need that? If anything we should rather get rid of that NVRAM firmware driver. It was needed before we had all NVMEM stuff in place. Finally how can reading iomem break mtd/ubi?!
Did you take a look at the bootlog on this post on the thread, I've mentioned your user handle a few times but received no response on the forum.
https://forum.openwrt.org/t/asus-rt-ac88u-hw-a6-broken-in-22-03-3/147882/6?u=arinc9
Well, it doesn't really matter *in context* of getting this patch accepted for mainline. It needs to be properly described on its own so people can review it without looking through dozens of forum posts.
Sorry for not following that closely, I lagged behind due to my work on other Broadcom topics. Broken LZMA, broken Linksys device support, broken BCM5358. I'll see if I can figure out sth from that thread.