mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-02-27 10:12:42 +00:00
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>
This commit is contained in:
parent
3872b422ff
commit
9b00e97956
@ -4,8 +4,15 @@
|
||||
|
||||
get_device_irq() {
|
||||
local device="$1"
|
||||
local line
|
||||
local seconds="0"
|
||||
|
||||
local line=$(grep -m 1 "${device}\$" /proc/interrupts)
|
||||
# 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/:.*//'
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user