本文主要记录Linux USB设备突然无法使用的排查过程。
今日在Linux设备上偶然又复现了鼠标、键盘等USB设备突然无法使用的现象。在拔插一个USB外设后所有USB设备都无法使用。起初以为是系统hang住了,但是远程设备的屏幕还在动,说明系统没挂死。于是找另外一台电脑,通过ssh连到故障机器上。通过`dmesg`命令查看系统日志,发现如下错误信息:
[4212816.216733] usb 1-6: USB disconnect, device number 15
[4212816.886038] ftdi_sio ttyUSB1: failed to get modem status: -19
[4212817.887128] ftdi_sio ttyUSB1: failed to get modem status: -19
[4212818.888208] ftdi_sio ttyUSB1: failed to get modem status: -19
[4212819.888644] ftdi_sio ttyUSB1: failed to get modem status: -19
[4212820.889722] ftdi_sio ttyUSB1: failed to get modem status: -19
[4212821.232516] xhci_hcd 0000:00:14.0: xHCI host not responding to stop endpoint command.
[4212821.232522] xhci_hcd 0000:00:14.0: USBSTS: 0x00000000
[4212821.232539] xhci_hcd 0000:00:14.0: xHCI host controller not responding, assume dead
[4212821.232562] xhci_hcd 0000:00:14.0: HC died; cleaning up
[4212821.232635] f