From 07e86d6da37b1e7aa62c9288a45e9eea7f0932e3 Mon Sep 17 00:00:00 2001 From: Furong Xu Date: Wed, 13 Dec 2023 13:43:43 +0800 Subject: [PATCH] rockchip: make SMP affinity of RTL8152 on XHCI more robust 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 (cherry picked from commit 314af7018a08a5a193b53848c9cd6a94f30a0055) --- .../armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity index d526f5e1d5..7b2195c5ff 100644 --- a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity +++ b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity @@ -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 @@ -43,7 +43,7 @@ radxa,rockpi-e|\ 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|\ friendlyarm,nanopi-r4se|\