X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/91264db571c7957c70a2441b532e32f317b9cf49..46a97d837460ca2122da3e32a963e99b1e76410d:/user/bkusbreset diff --git a/user/bkusbreset b/user/bkusbreset deleted file mode 100755 index 4e135f9..0000000 --- a/user/bkusbreset +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# script to force reset USB devices -# soruce: http://billauer.co.il/blog/2013/02/usb-reset-ehci-uhci-linux/ - - -if [[ $EUID != 0 ]] ; then - echo This must be run as root! - exit 1 -fi - -for xhci in /sys/bus/pci/drivers/?hci_hcd ; do - - if ! cd $xhci ; then - echo Weird error. Failed to change directory to $xhci - exit 1 - fi - - echo Resetting devices from $xhci... - - for i in ????:??:??.? ; do - echo -n "$i" > unbind - echo -n "$i" > bind - done -done