diff options
author | Ronny Kotzschmar <ro.ok@me.com> | 2022-07-06 15:14:21 +0200 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2022-07-15 07:05:16 +0200 |
commit | 01b8cd32003408ba3aab7a48b0ffa90b5b720f0d (patch) | |
tree | fa93c73a62e153ad15fad574ca1e2a61e86362b0 /target/linux | |
parent | 4fb05e45df7931ebe05dc0b42d781ad3d0a59404 (diff) | |
download | upstream-01b8cd32003408ba3aab7a48b0ffa90b5b720f0d.tar.gz upstream-01b8cd32003408ba3aab7a48b0ffa90b5b720f0d.tar.bz2 upstream-01b8cd32003408ba3aab7a48b0ffa90b5b720f0d.zip |
rockchip: reliably distribute net interrupts
On the NanoPI R4S it takes an average of 3..5 seconds for the network devices
to appear in '/proc/interrupts'.
Wait up to 10 seconds to ensure that the distribution of the interrupts
really happens.
Signed-off-by: Ronny Kotzschmar <ro.ok@me.com>
(cherry picked from commit 9b00e9795660f53caf1f4f5fd932bbbebd2eeeb1)
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity | 11 |
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/:.*//' } |