aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity')
-rw-r--r--target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity11
1 files changed, 9 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 9e4a4cf4fc..c76e62a23a 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
@@ -4,8 +4,15 @@
get_device_irq() {
local device="$1"
-
- local line=$(grep -m 1 "${device}\$" /proc/interrupts)
+ local line
+ local seconds="0"
+
+ # wait up to 10 seconds for the irq/device to appear
+ while [ "${seconds}" -le 10 ]; do
+ line=$(grep -m 1 "${device}\$" /proc/interrupts) && break
+ seconds="$(( seconds + 2 ))"
+ sleep 2
+ done
echo ${line} | sed 's/:.*//'
}