Add delayed second reprobe pass for in-flight probe races
This commit is contained in:
parent
b691318ecf
commit
4027a018b7
1 changed files with 13 additions and 5 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue