File tree Expand file tree Collapse file tree 5 files changed +64
-18
lines changed Expand file tree Collapse file tree 5 files changed +64
-18
lines changed Original file line number Diff line number Diff line change
1
+ # Use <pid/syslogd> as barrier for other system tasks and service that
2
+ # rely on modules, firmware, and device nodes to be ready.
3
+ service if:udevd nowarn env:-/etc/default/sysklogd <run/udevadm:post/success> \
4
+ [S0123456789] syslogd -F $SYSLOGD_ARGS -- System log daemon
Original file line number Diff line number Diff line change
1
+ # Extend finit's default udevadm settle synchronization for situations
2
+ # where device are very slow to probe (see #685)
3
+ run nowarn if:udevd cgroup.init <service/udevd/ready> log \
4
+ [S] /usr/libexec/infix/hw-wait -- Probing hardware
5
+
6
+ # Now that everything should be probed, do a final pass over the
7
+ # uevent queue before starting syslogd and everything else
8
+ run nowarn if:udevd cgroup.init :post <service/udevd/ready> log \
9
+ [S] udevadm settle -t 30 --
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # (Ab)use the kernel's device link subsystem to detect consumer side
3
+ # devices that may be very slow to probe (looking at you, mv88e6xxx!).
4
+
5
+ ident=$( basename " $0 " )
6
+
7
+ report ()
8
+ {
9
+ if [ -r " /tmp/$ident " ]; then
10
+ logger -k -p " user.$1 " -t " $ident " " Waited for slow devices:"
11
+ sort " /tmp/$ident " | uniq -c | logger -k -p " user.$1 " -t " $ident "
12
+ fi
13
+
14
+ rm -f " /tmp/$ident "
15
+ }
16
+
17
+ for _ in $( seq 50) ; do
18
+ again=
19
+
20
+ for dl in /sys/class/devlink/* ; do
21
+ [ -r " $dl /status" ] || continue
22
+
23
+ status=$( cat " $dl /status" )
24
+ if [ " $status " = " consumer probing" ]; then
25
+ basename " $( readlink " $dl /consumer" ) " >> " /tmp/$ident "
26
+ again=yes
27
+ fi
28
+
29
+ done
30
+
31
+ if [ -z " $again " ]; then
32
+ report notice
33
+ exit 0
34
+ fi
35
+
36
+ sleep .2
37
+ done
38
+
39
+ logger -k -p user.error -t " $ident " " Timeout waiting for devices to come online"
40
+ report error
41
+ exit 1
Original file line number Diff line number Diff line change @@ -14,24 +14,6 @@ for file in /sys/firmware/qemu_fw_cfg/by_name/opt/mactab/raw /etc/mactab; do
14
14
fi
15
15
done
16
16
17
- # Sometimes the sysfs is not populated when the switch driver is loaded, with the result
18
- # that the DSA interface was not found (no /dsa/tagging entry in sysfs. See issue #685.
19
- #
20
- # This mitigates that problem by waiting for sysfs to come up if a DSA switch is found
21
- if [ -n " $( devlink -j dev info | jq -r ' .info.[].driver' | grep -q mv88e6085) " ]; then
22
- timeout=50
23
- while [ -z " $( ls /sys/class/net/* /dsa/tagging) " ]; do
24
- timeout=$(( timeout- 1 ))
25
- if [ $timeout -eq 0 ]; then
26
- logger -k -p user.emerg -t " $ident " " Failed to find DSA interface"
27
- exit 1
28
- fi
29
- sleep 0.1
30
- done
31
-
32
- logger -k -p user.notice -t " $ident " " Found DSA interface in $timeout seconds"
33
- fi
34
-
35
17
# Find CPU interfaces used for connecting to a switch managed by DSA
36
18
for netif in /sys/class/net/* ; do
37
19
iface=$( basename " $netif " )
Original file line number Diff line number Diff line change @@ -4,6 +4,16 @@ Change Log
4
4
All notable changes to the project are documented in this file.
5
5
6
6
7
+ [ v24.11.1] [ UNRELEASED ]
8
+ -------------------------
9
+
10
+ ### Fixes
11
+
12
+ - Fix #685 : DSA conduit interface not always detected. Previous
13
+ attempt at a fix (v24.10.2) mitigated the issue, but did not
14
+ completely solve it.
15
+
16
+
7
17
[ v24.11.0] [ ] - 2024-11-20
8
18
-------------------------
9
19
You can’t perform that action at this time.
0 commit comments