]> git.donarmstrong.com Git - bin.git/commitdiff
add reset usb bus command master
authorDon Armstrong <don@donarmstrong.com>
Sun, 21 Jan 2024 21:05:02 +0000 (13:05 -0800)
committerDon Armstrong <don@donarmstrong.com>
Sun, 21 Jan 2024 21:05:16 +0000 (13:05 -0800)
reset_usb_bus [new file with mode: 0755]

diff --git a/reset_usb_bus b/reset_usb_bus
new file mode 100755 (executable)
index 0000000..590e51d
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+for i in /sys/bus/pci/drivers/[uoex]hci_hcd/*:*; do
+  [ -e "$i" ] || continue
+  echo "${i##*/}" > "${i%/*}/unbind"
+  echo "${i##*/}" > "${i%/*}/bind"
+done