flash-edl.sh: disable host USB autosuspend during EDL flashing

This commit is contained in:
Luxferre
2026-10-25 10:42:29 +02:00
parent 252197e857
commit 9b712dcbca
+6
View File
@@ -43,6 +43,12 @@ if [ "$(id -u)" -eq 0 ]; then
echo "[*] Unloading host qcserial kernel module so it does not claim 05c6:9008..."
modprobe -r qcserial 2>/dev/null || rmmod qcserial 2>/dev/null || true
fi
if [ -w /sys/module/usbcore/parameters/autosuspend ]; then
echo -1 > /sys/module/usbcore/parameters/autosuspend 2>/dev/null || true
fi
for pctrl in /sys/bus/usb/devices/usb*/power/control; do
[ -w "$pctrl" ] && echo on > "$pctrl" 2>/dev/null || true
done
udevadm control --reload 2>/dev/null || true
fi