我遇到了一个奇怪的问题,一个便宜的“反向 USB 集线器”——我不知道它的技术名称是什么——名为Tek Republic TUS-200 USB 共享交换机。它有一个 USB 端口用于连接设备,还有两个主机端口,可以连接两台计算机,还有一个交换机,可以将设备连接到一台或另一台计算机。我把它用作虚拟机(配备一个 USB 键盘和两台计算机)。
它在 Windows 上运行良好,但这可能只是因为我使用的笔记本电脑每个端口只有一个 USB 总线……稍后会详细介绍。
在 Linux 上,Debian 7(Wheezy) 3.2.0-4-amd64,它工作正常,直到同一 USB 总线上的另一台设备上有大量数据传输。例如,将大文件复制到 U 盘。
我几乎确信这与反向 USB 接地有关,因为当它仅连接到一台计算机时不会发生这种情况。
但这里的问题不在于调试上述设备,而在于合理Linux 内核 USB 系统日志消息,因为我从来没有处理过它们,现在我找不到任何用外行术语来解释它的东西。
这是:当我开始将数据转移到与反向集线器相同的 USB 总线上的 U 盘时,我得到了这个消息:
Feb 8 16:36:51 dotmatrix kernel: [10807.868649] generic-usb 0003:04D9:0114.0006: can't reset device, 0000:00:1a.0-1.6.4/input1, status -75
Feb 8 16:36:51 dotmatrix kernel: [10807.872669] usb 1-1.6: clear tt 1 (00a0) error -71
Feb 8 16:36:51 dotmatrix kernel: [10807.873710] generic-usb 0003:04D9:A09F.0001: can't reset device, 0000:00:1a.0-1.6.1/input0, status -71
Feb 8 16:36:51 dotmatrix kernel: [10807.876699] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -71
Feb 8 16:36:51 dotmatrix kernel: [10807.877658] usb 1-1.6: clear tt 1 (0080) error -71
Feb 8 16:36:51 dotmatrix kernel: [10807.881663] generic-usb 0003:04D9:A09F.0002: can't reset device, 0000:00:1a.0-1.6.1/input1, status -71
Feb 8 16:36:51 dotmatrix kernel: [10807.881766] usb 1-1.6: clear tt 1 (00a0) error -71
Feb 8 16:36:51 dotmatrix kernel: [10807.883641] generic-usb 0003:0C45:7401.0004: can't reset device, 0000:00:1a.0-1.6.3/input0, status -71
Feb 8 16:36:51 dotmatrix kernel: [10807.885815] generic-usb 0003:04D9:0114.0006: can't reset device, 0000:00:1a.0-1.6.4/input1, status -71
Feb 8 16:36:51 dotmatrix kernel: [10807.885880] usb 1-1.6: clear tt 1 (0080) error -71
过了一会儿,消息变成:
Feb 8 16:36:52 dotmatrix kernel: [10808.890502] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb 8 16:36:52 dotmatrix kernel: [10808.890752] generic-usb 0003:04D9:A09F.0001: can't reset device, 0000:00:1a.0-1.6.1/input0, status -32
Feb 8 16:36:52 dotmatrix kernel: [10808.892162] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:52 dotmatrix kernel: [10808.893202] generic-usb 0003:0C45:7401.0004: can't reset device, 0000:00:1a.0-1.6.3/input0, status -32
Feb 8 16:36:52 dotmatrix kernel: [10808.894235] generic-usb 0003:04D9:0114.0006: can't reset device, 0000:00:1a.0-1.6.4/input1, status -32
Feb 8 16:36:52 dotmatrix kernel: [10808.895038] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb 8 16:36:52 dotmatrix kernel: [10808.898724] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb 8 16:36:52 dotmatrix kernel: [10808.900590] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb 8 16:36:52 dotmatrix kernel: [10808.901409] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:52 dotmatrix kernel: [10808.901668] generic-usb 0003:0C45:7401.0004: can't reset device, 0000:00:1a.0-1.6.3/input0, status -32
然后是一个:
Feb 8 16:36:57 dotmatrix kernel: [10814.370566] usb 1-1.6.1: device not accepting address 8, error -32
然后回到上面的状态 -32。有时它会“重置”:
Feb 8 16:36:58 dotmatrix kernel: [10815.142955] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.144945] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.288169] usb 1-1.6.1: reset full-speed USB device number 8 using ehci_hcd
Feb 8 16:36:58 dotmatrix kernel: [10815.438083] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.452998] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.467998] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.481784] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.508875] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.521838] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.533804] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.545770] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.557731] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.569698] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:58 dotmatrix kernel: [10815.603594] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:59 dotmatrix kernel: [10815.635501] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:59 dotmatrix kernel: [10815.656441] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:59 dotmatrix kernel: [10815.666411] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -32
Feb 8 16:36:59 dotmatrix kernel: [10815.666655] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -32
Feb 8 16:36:59 dotmatrix kernel: [10815.694672] usb 1-1.6.1: device not accepting address 8, error -32
Feb 8 16:36:59 dotmatrix kernel: [10815.696707] usb 1-1.6.1: USB disconnect, device number 8
Feb 8 16:36:59 dotmatrix kernel: [10815.954352] usb 1-1.6.3: reset low-speed USB device number 9 using ehci_hcd
Feb 8 16:36:59 dotmatrix kernel: [10816.213579] usb 1-1.6.3: device descriptor read/64, error -32
Feb 8 16:36:59 dotmatrix kernel: [10816.576510] usb 1-1.6.3: device descriptor read/64, error -32
Feb 8 16:37:00 dotmatrix kernel: [10816.683747] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -16
Feb 8 16:37:00 dotmatrix kernel: [10816.939302] usb 1-1.6.3: reset low-speed USB device number 9 using ehci_hcd
Feb 8 16:37:00 dotmatrix kernel: [10817.198547] usb 1-1.6.3: device descriptor read/64, error -32
Feb 8 16:37:01 dotmatrix kernel: [10818.375220] usb 1-1.6.3: device descriptor read/64, error -32
Feb 8 16:37:05 dotmatrix kernel: [10821.729353] usb 1-1.6.3: reset low-speed USB device number 9 using ehci_hcd
Feb 8 16:37:05 dotmatrix kernel: [10822.135753] usb 1-1.6.3: device not accepting address 9, error -32
Feb 8 16:37:06 dotmatrix kernel: [10823.392464] usb 1-1.6.3: reset low-speed USB device number 9 using ehci_hcd
Feb 8 16:37:07 dotmatrix kernel: [10823.798897] usb 1-1.6.3: device not accepting address 9, error -32
Feb 8 16:37:07 dotmatrix kernel: [10823.871064] usb 1-1.6.4: reset full-speed USB device number 10 using ehci_hcd
Feb 8 16:37:08 dotmatrix kernel: [10825.031645] usb 1-1.6.1: new full-speed USB device number 19 using ehci_hcd
Feb 8 16:37:08 dotmatrix kernel: [10825.509849] usb 1-1.6.1: device not accepting address 19, error -32
Feb 8 16:37:09 dotmatrix kernel: [10826.427537] usb 1-1.6.1: new full-speed USB device number 20 using ehci_hcd
Feb 8 16:37:09 dotmatrix kernel: [10826.524335] usb 1-1.6.1: unable to read config index 0 descriptor/all
Feb 8 16:37:09 dotmatrix kernel: [10826.524340] usb 1-1.6.1: can't read configurations, error -32
Feb 8 16:37:10 dotmatrix kernel: [10826.595014] usb 1-1.6.1: new full-speed USB device number 21 using ehci_hcd
Feb 8 16:37:10 dotmatrix kernel: [10826.832449] usb 1-1.6.1: New USB device found, idVendor=04d9, idProduct=a09f
Feb 8 16:37:10 dotmatrix kernel: [10826.832454] usb 1-1.6.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Feb 8 16:37:10 dotmatrix kernel: [10826.832457] usb 1-1.6.1: Product: USB Gaming Mouse
Feb 8 16:37:10 dotmatrix kernel: [10826.832459] usb 1-1.6.1: Manufacturer: E-Signal
Feb 8 16:37:10 dotmatrix kernel: [10826.835328] input: E-Signal USB Gaming Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6.1/1-1.6.1:1.0/input/input11
Feb 8 16:37:10 dotmatrix kernel: [10826.835552] generic-usb 0003:04D9:A09F.0009: input,hidraw0: USB HID v1.10 Mouse [E-Signal USB Gaming Mouse] on usb-0000:00:1a.0-1.6.1/input0
Feb 8 16:37:10 dotmatrix kernel: [10826.840323] input: E-Signal USB Gaming Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.6/1-1.6.1/1-1.6.1:1.1/input/input12
Feb 8 16:37:10 dotmatrix kernel: [10826.840663] generic-usb 0003:04D9:A09F.000A: input,hiddev0,hidraw1: USB HID v1.10 Keyboard [E-Signal USB Gaming Mouse] on usb-0000:00:1a.0-1.6.1/input1
Feb 8 16:37:10 dotmatrix kernel: [10826.843392] generic-usb 0003:04D9:A09F.000B: hiddev0,hidraw2: USB HID v1.10 Device [E-Signal USB Gaming Mouse] on usb-0000:00:1a.0-1.6.1/input2
Feb 8 16:37:10 dotmatrix kernel: [10826.844372] usb 1-1.6.3: USB disconnect, device number 9
Feb 8 16:37:10 dotmatrix kernel: [10827.057683] usb 1-1.6.3: new low-speed USB device number 22 using ehci_hcd
Feb 8 16:37:10 dotmatrix kernel: [10827.129474] usb 1-1.6.3: device descriptor read/64, error -32
Feb 8 16:37:10 dotmatrix kernel: [10827.304942] usb 1-1.6.3: device descriptor read/64, error -32
Feb 8 16:37:10 dotmatrix kernel: [10827.480417] usb 1-1.6.3: new low-speed USB device number 23 using ehci_hcd
Feb 8 16:37:10 dotmatrix kernel: [10827.552202] usb 1-1.6.3: device descriptor read/64, error -32
Feb 8 16:37:11 dotmatrix kernel: [10827.727689] usb 1-1.6.3: device descriptor read/64, error -32
Feb 8 16:37:11 dotmatrix kernel: [10827.903169] usb 1-1.6.3: new low-speed USB device number 24 using ehci_hcd
Feb 8 16:37:11 dotmatrix kernel: [10828.029940] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb 8 16:37:11 dotmatrix kernel: [10828.038042] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb 8 16:37:11 dotmatrix kernel: [10828.309656] usb 1-1.6.3: device not accepting address 24, error -32
Feb 8 16:37:11 dotmatrix kernel: [10828.381760] usb 1-1.6.3: new low-speed USB device number 25 using ehci_hcd
Feb 8 16:37:12 dotmatrix kernel: [10828.788252] usb 1-1.6.3: device not accepting address 25, error -32
Feb 8 16:37:12 dotmatrix kernel: [10828.788575] hub 1-1.6:1.0: unable to enumerate USB device on port 3
Feb 8 16:37:35 dotmatrix kernel: [10851.552743] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb 8 16:37:48 dotmatrix kernel: [10864.780978] generic-usb 0003:04D9:A09F.0009: can't reset device, 0000:00:1a.0-1.6.1/input0, status -32
Feb 8 16:37:48 dotmatrix kernel: [10864.781857] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb 8 16:37:50 dotmatrix kernel: [10867.368090] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb 8 16:37:57 dotmatrix kernel: [10874.126293] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -32
Feb 8 16:38:05 dotmatrix kernel: [10882.314361] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -75
Feb 8 16:38:05 dotmatrix kernel: [10882.318341] usb 1-1.6: clear tt 1 (0150) error -71
Feb 8 16:38:05 dotmatrix kernel: [10882.319290] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -71
Feb 8 16:38:05 dotmatrix kernel: [10882.322411] generic-usb 0003:04D9:A09F.0009: can't reset device, 0000:00:1a.0-1.6.1/input0, status -71
Feb 8 16:38:05 dotmatrix kernel: [10882.323327] usb 1-1.6: clear tt 1 (00a0) error -71
Feb 8 16:38:05 dotmatrix kernel: [10882.327443] generic-usb 0003:04D9:0114.0005: can't reset device, 0000:00:1a.0-1.6.4/input0, status -71
Feb 8 16:38:05 dotmatrix kernel: [10882.327450] usb 1-1.6: clear tt 1 (0150) error -71
Feb 8 16:38:05 dotmatrix kernel: [10882.331515] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -71
Feb 8 16:38:05 dotmatrix kernel: [10882.331548] usb 1-1.6: clear tt 1 (00a0) error -71
Feb 8 16:38:05 dotmatrix kernel: [10882.335628] generic-usb 0003:04D9:0114.0006: can't reset device, 0000:00:1a.0-1.6.4/input1, status -71
Feb 8 16:38:05 dotmatrix kernel: [10882.335666] usb 1-1.6: clear tt 1 (0150) error -71
Feb 8 16:38:05 dotmatrix kernel: [10882.339740] generic-usb 0003:04D9:A09F.0009: can't reset device, 0000:00:1a.0-1.6.1/input0, status -71
Feb 8 16:38:05 dotmatrix kernel: [10882.339777] usb 1-1.6: clear tt 1 (00a0) error -71
Feb 8 16:38:05 dotmatrix kernel: [10882.343846] generic-usb 0003:04D9:0114.0008: can't reset device, 0000:00:1a.0-1.6.4/input3, status -71
Feb 8 16:38:05 dotmatrix kernel: [10882.343890] usb 1-1.6: clear tt 1 (0150) error -71
Feb 8 16:38:05 dotmatrix kernel: [10882.347950] generic-usb 0003:04D9:A09F.000A: can't reset device, 0000:00:1a.0-1.6.1/input1, status -71
Feb 8 16:38:05 dotmatrix kernel: [10882.348006] usb 1-1.6: clear tt 1 (00a0) error -71
我发现其他人也有同样的信息,但总是关于 USB 电视适配器。碰巧有相同的 USB供应商:设备ID 与此反向集线器相同。此外,一些八端口集线器(只有一个端口)也具有相同的 USB供应商:设备ID。所以我怀疑这是一个通用 USB 接口芯片的 ID。系统盘显示:
05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
在哪里可以获取有关正在发生的事情的更多信息?如何确保这不是设备故障(例如,如果主板为设备提供的电流不足,我可以在系统的某个地方看到它吗)?
为什么会列出这样的内容generic-usb 0003:0C45:7401.0004
?据我所知,这是否意味着<driver name> <usb bus>:<vendor id>:<device id>:<usb device in bus>
...是正确的?
为什么这么说can’t reset device 0000.00
?那些零代表什么意思?
在哪里可以找到状态、、-32
等的含义?-71
-75
有什么指南我应该读吗?我对此感到非常迷茫。
答案1
USB 状态代码及其可能的原因可以在内核源代码的文件中找到Documentation/usb/error-codes.txt
。Debian 9(Stretch),包含在包中linux-doc
,并将其安装在中/usr/share/doc/linux-doc-4.9/Documentation/usb/error-codes.txt.gz
。
请注意,该文件中的错误由其名称给出(如-71
)EPROTO
;要找出数字/名称匹配,您需要:
grep -w 71 /usr/include/asm-generic/errno*.h
或者换一种方式:
grep -w EPROTO /usr/include/asm-generic/errno*.h
确保系统中存在开发包含文件(在 Debian 中,通过执行apt-get install linux-libc-dev
),否则您将无法获得任何匹配...
较新的版本(例如 Debian 11(Bullseye))包含/usr/bin/errno
在moreutils
包中,这样更容易记住:
% errno 71
EPROTO 71 Protocol error
% errno EPROTO
EPROTO 71 Protocol error