Jonas Jelonek
6432b41180
realtek: rtl931x: fix setting number of leds per port
...
In rtl931x_led_init, the number of leds per port is not properly set. It
currently uses a hardcoded value of 1 which seems to be taken initially
from a specific device. This hardcoded value assumes any port always has
exactly two leds.
The RTL930x variant - rtl930x_led_init - does a better job at this. So
take it and use it for RTL931x too with the corresponding register.
While at it, rename the function to a proper naming scheme.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com >
Link: https://github.com/openwrt/openwrt/pull/19241
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de >
2025-07-13 16:47:42 +02:00
Jonas Jelonek
24d9fdff2e
realtek: rtl931x: add missing function reference for l2_hash_seed
...
Add missing function reference for the l2_hash_seed call in rtl931x_reg
in the rtl83xx DSA driver part.
While at it, rename the referenced function to proper naming convention
and simplify its content.
The missing reference causes a hard crash after a short time (on
MS510TXM) because the driver assumes the reference always exists.
[ 111.785559] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 805469a0
[ 111.800991] Oops[#1 ]:
[ 111.801026] CPU: 0 PID: 11 Comm: kworker/u8:0 Tainted: G O 6.12.33 #0
[ 111.801046] Workqueue: dsa_ordered dsa_slave_switchdev_event_work
...
[ 111.880600] epc : 00000000 0x0
[ 111.884219] ra : 805469a0 rtl83xx_port_fdb_add+0x7c/0x204
[ 111.890570] Status: 11000403 KERNEL EXL IE
[ 111.895263] Cause : 50800008 (ExcCode 02)
[ 111.899731] BadVA : 00000000
[ 111.902946] PrId : 0001a120 (MIPS interAptiv (multi))
[ 111.956086] Process kworker/u8:0 (pid: 11, threadinfo=0b107c25, task=265aeb31, tls=00000000)
...
[ 112.015167] Call Trace:
[ 112.019549] [<80170b04>] load_balance+0x494/0x708
[ 112.025022] [<807bb368>] dsa_port_do_fdb_add+0x24c/0x340
[ 112.031048] [<807bc868>] dsa_switch_event+0xd44/0x13cc
[ 112.036845] [<8015867c>] raw_notifier_call_chain+0x48/0x88
[ 112.043031] [<807bcf3c>] dsa_tree_notify+0x10/0x3c
[ 112.048395] [<807b2a64>] dsa_port_bridge_host_fdb_add+0x15c/0x190
[ 112.055459] [<807b4e40>] dsa_slave_switchdev_event_work+0x164/0x1cc
...
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com >
Link: https://github.com/openwrt/openwrt/pull/19170
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de >
2025-06-19 19:22:45 +02:00