diff --git a/src/freedombone-utils-setup b/src/freedombone-utils-setup index 38332182..72197156 100755 --- a/src/freedombone-utils-setup +++ b/src/freedombone-utils-setup @@ -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 diff --git a/src/freedombone-utils-wifi b/src/freedombone-utils-wifi index e51b6797..c856c86c 100755 --- a/src/freedombone-utils-wifi +++ b/src/freedombone-utils-wifi @@ -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 {