1
0
Fork 0

Add delayed second reprobe pass for in-flight probe races

This commit is contained in:
Brendan Szymanski 2026-07-13 04:34:36 -04:00
parent b691318ecf
commit 4027a018b7

View file

@ -20,11 +20,19 @@
# stack starts.
# 1. USB: ask the kernel to re-run driver matching for unbound interfaces
# (directories like 1-1:1.0 without a "driver" symlink).
for intf in /sys/bus/usb/devices/*:*; do
[ -e "$intf/driver" ] && continue
echo "${intf##*/}" > /sys/bus/usb/drivers_probe 2>/dev/null
done
# (directories like 1-1:1.0 without a "driver" symlink). Two passes with a
# delay: a probe that was already in flight (started just before /vendor
# finished mounting) can still fail after the first pass runs; the second
# pass catches the interface it leaves behind.
reprobe_usb() {
for intf in /sys/bus/usb/devices/*:*; do
[ -e "$intf/driver" ] && continue
echo "${intf##*/}" > /sys/bus/usb/drivers_probe 2>/dev/null
done
}
reprobe_usb
sleep 3
reprobe_usb
# 2. Bluetooth: unbind + re-probe serdev devices so the hci_bcm driver's
# firmware patch request runs again with /vendor/firmware available.