2 # script to force reset USB devices
3 # soruce: http://billauer.co.il/blog/2013/02/usb-reset-ehci-uhci-linux/
6 if [[ $EUID != 0 ]] ; then
7 echo This must be run as root
!
11 for xhci
in /sys
/bus
/pci
/drivers
/?hci_hcd
; do
14 echo Weird error. Failed to change directory to
$xhci
18 echo Resetting devices from
$xhci...
20 for i
in ????
:??
:??.?
; do