diff options
| author | Markus Stockhausen | 2025-12-30 13:07:32 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2025-12-31 20:55:32 +0000 |
| commit | 8e6cd2608ab14a017f493dd10bd4a6045a5bac0f (patch) | |
| tree | 8e878c661817e6905b3b6919c3629bf6bc69d75d | |
| parent | 6b2e7ffd4be91ca6245b34e5ed55e858860a2191 (diff) | |
| download | openwrt-8e6cd2608ab14a017f493dd10bd4a6045a5bac0f.tar.gz | |
realtek: setup cpu port in soc_info structure
A lot of soc_info usage has been reorganized. Nevertheless there
are some consumers left. A very critical one is the dsa/qos coding.
It makes use of the cpu_port in this shared structure. This is
totally broken as that info is never properly initialized. Fill
the cpu_port according to the identified hardware.
Remark: Looking at the prom.c history soc_info.cpu_port was never
setup since the beginning of time. So no "fixes" tag here.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21327
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c b/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c index acd9f4581d..689e862d27 100644 --- a/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c +++ b/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c @@ -187,6 +187,7 @@ static u32 __init read_model(void) if ((id >= 0x8380 && id <= 0x8382) || id == 0x8330 || id == 0x8332) { soc_info.id = id; soc_info.family = RTL8380_FAMILY_ID; + soc_info.cpu_port = RTL838X_CPU_PORT; rtl838x_read_details(model); return model; } @@ -196,6 +197,7 @@ static u32 __init read_model(void) if ((id >= 0x8391 && id <= 0x8396) || (id >= 0x8351 && id <= 0x8353)) { soc_info.id = id; soc_info.family = RTL8390_FAMILY_ID; + soc_info.cpu_port = RTL839X_CPU_PORT; rtl839x_read_details(model); return model; } @@ -205,11 +207,13 @@ static u32 __init read_model(void) if (id >= 0x9301 && id <= 0x9303) { soc_info.id = id; soc_info.family = RTL9300_FAMILY_ID; + soc_info.cpu_port = RTL930X_CPU_PORT; rtl93xx_read_details(model); return model; } else if (id >= 0x9311 && id <= 0x9313) { soc_info.id = id; soc_info.family = RTL9310_FAMILY_ID; + soc_info.cpu_port = RTL931X_CPU_PORT; rtl93xx_read_details(model); return model; } |