我如何修复 xHCI host controller not responding, assume dead

问题:

在 Linux 中,我的 USB 3.0 集线器随机不断重置,只有重启后才能恢复:所有 USB 设备都离线,直到我手动重启系统。这是 dmesg 输出:

dmesg_xhci.txt
[ 3685.684555] xhci_hcd 0000:04:00.0: Abort failed to stop command ring: -110
[ 3685.716572] xhci_hcd 0000:04:00.0: Host halt failed, -110
[ 3685.716575] xhci_hcd 0000:04:00.0: xHCI host controller not responding, assume dead
[ 3685.716620] xhci_hcd 0000:04:00.0: HC died; cleaning up
[ 3685.716653] xhci_hcd 0000:04:00.0: Timeout while waiting for setup device command
[ 3685.716820] usb 3-2: USB disconnect, device number 3
[ 3685.716942] usb 4-2: USB disconnect, device number 2
[ 3685.716944] usb 4-2.4: USB disconnect, device number 3
[ 3686.268612] usb 3-2.3: device not accepting address 29, error -22
[ 3686.268694] usb 3-2.3: USB disconnect, device number 29
[ 3686.269109] usb 3-2.4: USB disconnect, device number 4
[ 3686.269114] usb 3-2.4.1: USB disconnect, device number 5
[ 3686.345109] usb 3-2.4.2: USB disconnect, device number 9
[ 3686.573230] usb 3-2.4.3: USB disconnect, device number 7
[ 3686.701272] usb 3-2.4.4: USB disconnect, device number 8

解决方案

我在 ArchLinux 论坛上发现了解决方案(基本上重启 xHCI USB 设备):

restart_xhci.sh
echo -n "0000:04:00.0" > /sys/bus/pci/drivers/xhci_hcd/unbind
echo -n "0000:04:00.0" > /sys/bus/pci/drivers/xhci_hcd/bind

你需要插入你的设备 ID,你可以在 dmesg 输出中找到(在我的情况下是 0000:04:00.0),并以 root 身份运行代码。


Check out similar posts by category: Linux