如何知道哪个 USB 端口与哪个 root_hub 相关联?

如何知道哪个 USB 端口与哪个 root_hub 相关联?

我有一个需求,我想使用 USB 集线器将许多 USB 设备连接到系统。目前,我有 2 个 20 端口 USB 集线器,以这种方式连接了 40 个 USB 设备。当我尝试通过添加另一个 USB 集线器来添加更多设备时,我达到了 xHCI 的限制。请注意,USB 集线器和 USB 设备都是 USB 2.0。

> dmesg

[33358.689138] xhci_hcd 0000:00:14.0: Error while assigning device slot ID
[33358.691346] xhci_hcd 0000:00:14.0: Max number of devices this xHCI host supports is 64.
[33358.693245] usb 1-7-port5: couldn't allocate usb_device

根据我的发现,添加 PCIE 卡以获得更多 USB 端口应该可以解决问题,因为它将添加一个新的主控制器。但我认为,目前我的主板本身有一个未使用的主机控制器。

> lsusb-t

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 20000M/x2
    |__ Port 8: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 2: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 2: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 4: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 4: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
    |__ Port 10: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 95, If 0, Class=Hub, Driver=hub/7p, 480M
            |__ Port 3: Dev 98, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 3: Dev 79, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 3: Dev 79, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 3: Dev 79, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 4: Dev 81, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 4: Dev 81, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 4: Dev 81, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 10, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 10, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 10, If 1, Class=CDC Data, Driver=cdc_ether, 480M
            |__ Port 1: Dev 96, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 4: Dev 73, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 4: Dev 73, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 4: Dev 73, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 127, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 127, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 127, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 3: Dev 42, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 3: Dev 42, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 3: Dev 42, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 1: Dev 18, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 1: Dev 18, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 1: Dev 18, If 1, Class=CDC Data, Driver=cdc_ether, 480M
            |__ Port 6: Dev 101, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 1: Dev 29, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 1: Dev 29, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 1: Dev 29, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 4: Dev 69, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 4: Dev 69, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 4: Dev 69, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 41, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 41, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 41, If 2, Class=Mass Storage, Driver=usb-storage, 480M
            |__ Port 4: Dev 100, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 1: Dev 83, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 1: Dev 83, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 1: Dev 83, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 4: Dev 67, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 4: Dev 67, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 4: Dev 67, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 85, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 85, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 85, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 3: Dev 65, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 3: Dev 65, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 3: Dev 65, If 0, Class=Communications, Driver=cdc_ether, 480M
            |__ Port 2: Dev 97, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 4: Dev 27, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 4: Dev 27, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 4: Dev 27, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 39, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 39, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 39, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 3: Dev 71, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 3: Dev 71, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 3: Dev 71, If 1, Class=CDC Data, Driver=cdc_ether, 480M
            |__ Port 7: Dev 103, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 3: Dev 77, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 3: Dev 77, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 3: Dev 77, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 1: Dev 8, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 1: Dev 8, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 1: Dev 8, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 75, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 75, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 75, If 1, Class=CDC Data, Driver=cdc_ether, 480M
        |__ Port 3: Dev 99, If 0, Class=Hub, Driver=hub/7p, 480M
            |__ Port 7: Dev 108, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 2: Dev 117, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 117, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 117, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 3: Dev 119, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 3: Dev 119, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 3: Dev 119, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 1: Dev 36, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 1: Dev 36, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 1: Dev 36, If 1, Class=CDC Data, Driver=cdc_ether, 480M
            |__ Port 3: Dev 105, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 3: Dev 43, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 3: Dev 43, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 3: Dev 43, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 4: Dev 55, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 4: Dev 55, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 4: Dev 55, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 31, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 31, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 31, If 0, Class=Communications, Driver=cdc_ether, 480M
            |__ Port 1: Dev 102, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 4: Dev 53, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 4: Dev 53, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 4: Dev 53, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 109, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 109, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 109, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 3: Dev 111, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 3: Dev 111, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 3: Dev 111, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 1: Dev 14, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 1: Dev 14, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 1: Dev 14, If 0, Class=Communications, Driver=cdc_ether, 480M
            |__ Port 6: Dev 107, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 1: Dev 12, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 1: Dev 12, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 1: Dev 12, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 4: Dev 89, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 4: Dev 89, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 4: Dev 89, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 87, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 87, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 87, If 1, Class=CDC Data, Driver=cdc_ether, 480M
            |__ Port 4: Dev 106, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 4: Dev 66, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 4: Dev 66, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 4: Dev 66, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 123, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 2: Dev 123, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 123, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 3: Dev 125, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 3: Dev 125, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 3: Dev 125, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 1: Dev 121, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 1: Dev 121, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 1: Dev 121, If 0, Class=Communications, Driver=cdc_ether, 480M
            |__ Port 2: Dev 104, If 0, Class=Hub, Driver=hub/4p, 480M
                |__ Port 3: Dev 37, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 3: Dev 37, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 3: Dev 37, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 4: Dev 93, If 1, Class=CDC Data, Driver=cdc_ether, 480M
                |__ Port 4: Dev 93, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 4: Dev 93, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 91, If 2, Class=Mass Storage, Driver=usb-storage, 480M
                |__ Port 2: Dev 91, If 0, Class=Communications, Driver=cdc_ether, 480M
                |__ Port 2: Dev 91, If 1, Class=CDC Data, Driver=cdc_ether, 480M
    |__ Port 13: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 14: Dev 7, If 0, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 14: Dev 7, If 1, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 14: Dev 7, If 2, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 14: Dev 7, If 3, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 14: Dev 7, If 4, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 14: Dev 7, If 5, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 14: Dev 7, If 6, Class=Audio, Driver=snd-usb-audio, 480M
    |__ Port 14: Dev 7, If 7, Class=Human Interface Device, Driver=usbhid, 480M

这个

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 20000M/x2
    |__ Port 8: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M

如果我的假设是正确的,我如何访问与之相关的端口Port 8: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M

主板还有 2 个 USB C 端口。我尝试使用我闲置的 MacBook C 型扩展器来使用它们,但我不确定这是否是正确的测试方法,因为扩展器有 2xHDMI、1xETH、1xAUX、4xUSB 3.0、1xUSB C 等。

我这样做了,但再次收到相同的错误,但这次集线器已添加到有问题的根控制器,但没有添加到Port 8: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M

以下是连接该扩展器后的所有日志: > dmesg

[34744.523932] usb 2-5: new SuperSpeed USB device number 12 using xhci_hcd
[34744.545939] usb 2-5: New USB device found, idVendor=2109, idProduct=0817, bcdDevice= 4.73
[34744.545951] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[34744.545955] usb 2-5: Product: USB3.0 Hub             
[34744.545959] usb 2-5: Manufacturer: VIA Labs, Inc.         
[34744.551886] hub 2-5:1.0: USB hub found
[34744.552205] hub 2-5:1.0: 4 ports detected
[34744.671720] usb 1-7: new high-speed USB device number 54 using xhci_hcd
[34744.821952] usb 1-7: New USB device found, idVendor=2109, idProduct=2817, bcdDevice= 4.73
[34744.821964] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[34744.821968] usb 1-7: Product: USB2.0 Hub             
[34744.821972] usb 1-7: Manufacturer: VIA Labs, Inc.         
[34744.827068] hub 1-7:1.0: USB hub found
[34744.827418] hub 1-7:1.0: 5 ports detected
[34745.139969] usb 2-5.1: new SuperSpeed USB device number 13 using xhci_hcd
[34745.161857] usb 2-5.1: New USB device found, idVendor=2109, idProduct=0817, bcdDevice= 4.73
[34745.161870] usb 2-5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[34745.161875] usb 2-5.1: Product: USB3.0 Hub             
[34745.161878] usb 2-5.1: Manufacturer: VIA Labs, Inc.         
[34745.168740] hub 2-5.1:1.0: USB hub found
[34745.169074] hub 2-5.1:1.0: 4 ports detected
[34745.256248] usb 2-5.4: new SuperSpeed USB device number 14 using xhci_hcd
[34745.285690] usb 2-5.4: New USB device found, idVendor=05e3, idProduct=0749, bcdDevice=15.39
[34745.285703] usb 2-5.4: New USB device strings: Mfr=3, Product=4, SerialNumber=2
[34745.285708] usb 2-5.4: Product: USB3.0 Card Reader
[34745.285711] usb 2-5.4: Manufacturer: Generic
[34745.285714] usb 2-5.4: SerialNumber: 000000001539
[34745.300233] usb-storage 2-5.4:1.0: USB Mass Storage device detected
[34745.300810] scsi host46: usb-storage 2-5.4:1.0
[34745.420338] xhci_hcd 0000:00:14.0: Error while assigning device slot ID
[34745.422924] xhci_hcd 0000:00:14.0: Max number of devices this xHCI host supports is 64.
[34745.426402] usb 1-7-port1: couldn't allocate usb_device
[34745.428601] xhci_hcd 0000:00:14.0: Error while assigning device slot ID
[34745.431287] xhci_hcd 0000:00:14.0: Max number of devices this xHCI host supports is 64.
[34745.434990] usb 1-7-port2: couldn't allocate usb_device
[34746.310845] scsi 46:0:0:0: Direct-Access     Generic  MassStorageClass 1539 PQ: 0 ANSI: 6
[34746.312157] scsi 46:0:0:1: Direct-Access     Generic  MassStorageClass 1539 PQ: 0 ANSI: 6
[34746.312762] sd 46:0:0:0: Attached scsi generic sg41 type 0
[34746.313107] sd 46:0:0:1: Attached scsi generic sg42 type 0
[34746.516474] sd 46:0:0:0: [sdap] Media removed, stopped polling
[34746.720153] sd 46:0:0:1: [sdaq] Media removed, stopped polling
[34746.722839] sd 46:0:0:0: [sdap] Attached SCSI removable disk
[34746.727157] sd 46:0:0:1: [sdaq] Attached SCSI removable disk
[34749.455215] xhci_hcd 0000:00:14.0: Error while assigning device slot ID
[34749.458569] xhci_hcd 0000:00:14.0: Max number of devices this xHCI host supports is 64.
[34749.460521] usb 1-7-port1: couldn't allocate usb_device
[34749.461979] xhci_hcd 0000:00:14.0: Error while assigning device slot ID
[34749.463156] xhci_hcd 0000:00:14.0: Max number of devices this xHCI host supports is 64.
[34749.466159] usb 1-7-port2: couldn't allocate usb_device
[34749.469438] xhci_hcd 0000:00:14.0: Error while assigning device slot ID
[34749.471022] xhci_hcd 0000:00:14.0: Max number of devices this xHCI host supports is 64.
[34749.472421] usb 1-7-port5: couldn't allocate usb_device

> lsusb-t

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 20000M/x2
    |__ Port 5: Dev 12, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 1: Dev 13, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 4: Dev 14, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
    |__ Port 8: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 2: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 2: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 4: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 4: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
    |__ Port 7: Dev 54, If 0, Class=Hub, Driver=hub/5p, 480M
    ...
    ...
  • 主板:华硕 ROG Strix Z590-E Gaming
  • 操作系统:Ubuntu 22.04.1 LTS
  • 集线器:UHPPOTE Sipolar 工业级 20 端口 Usb2.0 集线器
  • USB 设备:E3372H 调制解调器

概括:

  1. 是否可以在现有主板上添加更多 USB 设备?
  2. 那真的是一个未使用的 root_hub 吗?
  3. 如果可以,那么我们可以连接更多 USB 设备吗?
  4. 如果可能的话,如何将更多 USB 设备连接到系统?
  5. 如果无法添加到现有系统,那么还有哪些其他方法可以添加更多设备?PCIE 卡?有什么建议吗?

相关内容