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