Skip to content

Instantly share code, notes, and snippets.

@bpetlert
Created September 25, 2022 07:53
Show Gist options
  • Save bpetlert/aa8ce91b07363f5c16dc407a39dc7626 to your computer and use it in GitHub Desktop.
Save bpetlert/aa8ce91b07363f5c16dc407a39dc7626 to your computer and use it in GitHub Desktop.
Restart USB 3.0 to ethernet adapter (ASIX Electronics Corp. AX88179 Gigabit Ethernet)
#!/usr/bin/env bash
#
# Restart USB 3.0 to ethernet adapter (ASIX Electronics Corp. AX88179 Gigabit Ethernet)
#
# The device will stop functioning with this error message below:
#
# [ 1179.475926] kernel: xhci_hcd 0000:04:00.0: WARN: TRB error for slot 1 ep 5 on endpoint
# [ 1179.607026] kernel: xhci_hcd 0000:04:00.0: WARN waiting for error on ep to be cleared
# [ 1179.607049] kernel: xhci_hcd 0000:04:00.0: WARN waiting for error on ep to be cleared
# [ 1179.607054] kernel: xhci_hcd 0000:04:00.0: WARN waiting for error on ep to be cleared
# [ 1179.607058] kernel: xhci_hcd 0000:04:00.0: WARN waiting for error on ep to be cleared
#
#
# Disconnect device
echo "Unbind => ASIX Electronics Corp. AX88179 Gigabit Ethernet"
echo -n "0000:04:00.0" | sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind > /dev/null
sleep 3s
# Reconnect device
echo "Bind => ASIX Electronics Corp. AX88179 Gigabit Ethernet"
echo -n "0000:04:00.0" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment