[openwrt/openwrt] realtek: setup cpu port in soc_info structure
LEDE Commits
lede-commits at lists.infradead.org
Wed Dec 31 13:00:29 PST 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8e6cd2608ab14a017f493dd10bd4a6045a5bac0f
commit 8e6cd2608ab14a017f493dd10bd4a6045a5bac0f
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Tue Dec 30 14:07:32 2025 +0100
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 at gmx.de>
Link: https://github.com/openwrt/openwrt/pull/21327
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c | 4 ++++
1 file changed, 4 insertions(+)
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;
}
More information about the lede-commits
mailing list