Reset usb devices
This commit is contained in:
parent
f24c1f6f2d
commit
bb4e27fd67
|
@ -89,6 +89,23 @@ function running_as_root {
|
|||
fi
|
||||
}
|
||||
|
||||
function reset_usb_devices {
|
||||
for xhci in /sys/bus/pci/drivers/?hci_hcd ; do
|
||||
|
||||
if ! cd $xhci ; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo Resetting devices from $xhci...
|
||||
|
||||
for i in ????:??:??.? ; do
|
||||
echo -n "$i" > unbind
|
||||
echo -n "$i" > bind
|
||||
done
|
||||
done
|
||||
udevadm control --reload-rules
|
||||
}
|
||||
|
||||
function initial_setup {
|
||||
if [[ $(is_completed $FUNCNAME) == "1" ]]; then
|
||||
return
|
||||
|
|
|
@ -67,7 +67,7 @@ function setup_wifi_atheros {
|
|||
cd /lib/firmware
|
||||
tar -xzvf $atheros_drivers_file
|
||||
cd $curr_dir
|
||||
udevadm control --reload-rules
|
||||
reset_usb_devices
|
||||
}
|
||||
|
||||
function setup_wifi {
|
||||
|
|
Loading…
Reference in New Issue