rockchip: make SMP affinity of RTL8152 on XHCI more robust
authorFurong Xu <xfr@outlook.com>
Wed, 13 Dec 2023 05:43:43 +0000 (13:43 +0800)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 15 Dec 2023 17:02:43 +0000 (18:02 +0100)
XHCI bus numbers are assigned dynamically, it may varies among boards,
match the device irq name with regexp, drop the hardcoded name.

Signed-off-by: Furong Xu <xfr@outlook.com>
target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity

index fc181dff46f084932b78df5835b5d3b36b02a06d..09fc420fec80e25a5979ef46b6af358eb2f51e86 100644 (file)
@@ -9,7 +9,7 @@ get_device_irq() {
 
        # wait up to 10 seconds for the irq/device to appear
        while [ "${seconds}" -le 10 ]; do
-               line=$(grep -m 1 "${device}\$" /proc/interrupts) && break
+               line=$(grep -E -m 1 "${device}\$" /proc/interrupts) && break
                seconds="$(( seconds + 2 ))"
                sleep 2
        done
@@ -34,7 +34,7 @@ friendlyarm,nanopi-r2s|\
 xunlong,orangepi-r1-plus|\
 xunlong,orangepi-r1-plus-lts)
        set_interface_core 2 "eth0"
-       set_interface_core 4 "eth1" "xhci-hcd:usb1"
+       set_interface_core 4 "eth1" "xhci-hcd:usb[0-9]+"
        ;;
 friendlyarm,nanopi-r4s)
        set_interface_core 10 "eth0"