为什么 lsusb 将连接到 USB 3 端口的设备显示为连接到 USB2 根集线器?

Mar*_*ven 7 usb sd-card lsusb

我在 Dell Chromebook 11 上运行 Ubuntu,它有两个 USB 3 端口和一个 SD 读卡器。我试图确定 SD 卡读卡器是否能够达到 USB 3 的速度(因此是否值得购买 130MB/s 的 SD 卡),但我不知道它是否在内部物理连接到 USB 3。

我认为我可能会这样做的一种方法是在插入 SD 卡后运行 lsusb - 但是,如果我将 USB2 设备插入 USB 3 端口之一,它无论如何都会连接到 USB 2 集线器。如果我将 USB 3 设备放入同一个端口,它显示为已连接到 USB 3 集线器。

  1. 为什么 lsusb 将连接到 USB3 端口的 USB2 设备显示为连接到 USB 2 根?
  2. 有没有办法获得 USB 端口到集线器的物理映射而不是逻辑映射?
  3. 回到我研究这个问题的最初原因,有没有办法在购买之前判断内置 SD 卡读卡器的速度?

小智 5

Why does lsusb show USB2 devices connected to a USB3 port as being attached to the USB 2 root?

Answer :

In USB 3.0, dual-bus architecture is used to allow both USB 2.0 (Full Speed, Low Speed, or High Speed) and USB 3.0 (SuperSpeed) operations to take place simultaneously, thus providing backward compatibility.

Source: https://en.wikipedia.org/wiki/USB_3.0

For instance, on a machine that contains two 2.0 USB ports and one USB 3.0 port, the output of the lsusb command shows:

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 2.0 root hub 
Bus 003 Device 002: ID 8087:8004 Intel Corp. 
Bus 003 Device 001: ID 1d6b:0008 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 058f:6386 Alcor Micro Corp. Multi Flash Reader
Bus 002 Device 001: ID 1d6b:0007 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Run Code Online (Sandbox Code Playgroud)

The extra USB 2.0 root hub is part of the USB 3.0 root hub and is available there to provide backward compatibility with USB 2.0 standards. As a result of this, when you connect USB2 devices into USB3 port, they are shown connected to 2.0 root hub.


Is there a way to get the physical rather than logical mapping of USB ports to hubs?

Answer: Use lsusb -t

-t     Tells lsusb to dump the physical USB device hierarchy as a tree.
Run Code Online (Sandbox Code Playgroud)

Source: lsusb man page


Coming back to my original reason for looking into this, is there a way to tell what speed the internal SD card reader is capable of before buying one?

This can be done by using the following steps. Here we are considering a laptop with a built-in card reader from Alcor Micro Corp.

  1. Use lsusb command

    $ lsusb 
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 2.0 root hub 
    Bus 003 Device 002: ID 8087:8004 Intel Corp. 
    Bus 003 Device 001: ID 1d6b:0008 Linux Foundation 2.0 root hub
    Bus 001 Device 002: ID 058f:6386 Alcor Micro Corp. Multi Flash Reader
    Bus 002 Device 001: ID 1d6b:0007 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    
    Run Code Online (Sandbox Code Playgroud)

    Find out the Bus number of the card reader. In this example it is 001

  2. Use lsusb -t

    $ lsusb -t 
    /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M 
    |__ Port 5: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M
    
    Run Code Online (Sandbox Code Playgroud)

    At the end of each line, the negotiated communication speed for each device is shown in Mbits/s.
    The 480Mbit/s is called "Hi-Speed" and is used with USB2.0.

For USB 3.0, the negotiated communication speed is 5000Mbit/s called "SuperSpeed" (5Gbit/s)

Source: https://en.wikipedia.org/wiki/USB

结果:Alcor Micro Corp 的读卡器支持 USB 2.0 标准而不是 USB 3.0 标准,因为输出中提到了 480M。