Created
October 3, 2014 07:19
-
-
Save robbyoconnor/b94252a81907ab411a91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment