From 47bb54254c9c1aa82298de2c3b7d5cbc30c0e8cc Mon Sep 17 00:00:00 2001 From: Tobias Waldekranz Date: Thu, 21 Nov 2024 14:08:07 +0100 Subject: [PATCH] Revert "Make detection of DSA interface more robust" This reverts commit 0ee973b2b214d274b3062b00b5a03b9ff92cb7c9. Turns out that this workaround simply reduced the size of the window where this issue can occur. The previous change now ensures that the DSA tree is always fully setup by the time nameif runs. --- .../rootfs/usr/libexec/infix/init.d/20-nameif | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/board/common/rootfs/usr/libexec/infix/init.d/20-nameif b/board/common/rootfs/usr/libexec/infix/init.d/20-nameif index 97c75340..33039259 100755 --- a/board/common/rootfs/usr/libexec/infix/init.d/20-nameif +++ b/board/common/rootfs/usr/libexec/infix/init.d/20-nameif @@ -14,24 +14,6 @@ for file in /sys/firmware/qemu_fw_cfg/by_name/opt/mactab/raw /etc/mactab; do fi done -# Sometimes the sysfs is not populated when the switch driver is loaded, with the result -# that the DSA interface was not found (no /dsa/tagging entry in sysfs. See issue #685. -# -# This mitigates that problem by waiting for sysfs to come up if a DSA switch is found -if [ -n "$(devlink -j dev info | jq -r '.info.[].driver' | grep -q mv88e6085)" ]; then - timeout=50 - while [ -z "$(ls /sys/class/net/*/dsa/tagging)" ]; do - timeout=$((timeout-1)) - if [ $timeout -eq 0 ]; then - logger -k -p user.emerg -t "$ident" "Failed to find DSA interface" - exit 1 - fi - sleep 0.1 - done - - logger -k -p user.notice -t "$ident" "Found DSA interface in $timeout seconds" -fi - # Find CPU interfaces used for connecting to a switch managed by DSA for netif in /sys/class/net/*; do iface=$(basename "$netif")