USB Standards and Supports in Linux

Posted on In Hardware, Linux, News

The USB standards have evolved to 3.1 and the supported throughput have been increased too. On Linux, the support to USB standards are following the standards development. In this post, we will survey the standards that common hardware support and the support in Linux.

USB standards

USB 2.0: https://en.wikipedia.org/wiki/USB#USB_2.0

  • Speed: <= 60MB/s, or 480 Mbps
  • Availability: I believe almost all modern servers support it.

USB 3.0: https://en.wikipedia.org/wiki/USB_3.0

USB 3.1: https://en.wikipedia.org/wiki/USB_3.1

  • Speed: (Gen2) <= 10 Gbps
  • Availability: May be lower than USB 3.0. As the USB storage device and the server mother board and the OS driver should all work well.

Related: identify the type of USB by colors: https://www.geeksinphoenix.com/blog/post/2014/01/12/How-to-tell-what-type-of-USB-connector-you-have-by-color.aspx

USB.png

USB stnadards support in Linux

In Linux 3.x, USB 3.0 support should be there https://github.com/sarahsharp/xhci . Seems added since 2.6.31 http://www.linux-magazine.com/Online/News/First-Driver-for-USB-3.0 .

For USB 3.1, it may be after 4.6 http://www.theinquirer.net/inquirer/news/2458228/linux-kernel-46-brings-usb-31-support-and-a-new-orangefs-file-system .

Some real checking

On a PC with CentOS 7:

Both USB 2.0 and USB 3.0 bus/drivers are used

$ dmesg | grep -P "xhci|ehci"
[    0.491877] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    0.491899] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[    0.492968] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x00009810
[    0.492972] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
[    0.492985] xhci_hcd 0000:00:14.0: irq 25 for MSI/MSI-X
[    0.493032] usb usb1: Manufacturer: Linux 3.10.0-327.36.3.el7.x86_64 xhci-hcd
[    0.494982] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    0.495002] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[    0.495031] usb usb2: Manufacturer: Linux 3.10.0-327.36.3.el7.x86_64 xhci-hcd
[    0.501360] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.501365] ehci-pci: EHCI PCI platform driver
[    0.501423] ehci-pci 0000:00:1a.0: EHCI Host Controller
[    0.501447] ehci-pci 0000:00:1a.0: new USB bus registered, assigned bus number 3
[    0.501457] ehci-pci 0000:00:1a.0: debug port 2
[    0.505354] ehci-pci 0000:00:1a.0: cache line size of 64 is not supported
[    0.505364] ehci-pci 0000:00:1a.0: irq 20, io mem 0xf7d1c000
[    0.511356] ehci-pci 0000:00:1a.0: USB 2.0 started, EHCI 1.00
[    0.511379] usb usb3: Manufacturer: Linux 3.10.0-327.36.3.el7.x86_64 ehci_hcd
[    0.511535] ehci-pci 0000:00:1d.0: EHCI Host Controller
[    0.511558] ehci-pci 0000:00:1d.0: new USB bus registered, assigned bus number 4
[    0.511566] ehci-pci 0000:00:1d.0: debug port 2
[    0.515464] ehci-pci 0000:00:1d.0: cache line size of 64 is not supported
[    0.515473] ehci-pci 0000:00:1d.0: irq 23, io mem 0xf7d1b000
[    0.521364] ehci-pci 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[    0.521383] usb usb4: Manufacturer: Linux 3.10.0-327.36.3.el7.x86_64 ehci_hcd
[    0.813648] usb 3-1: new high-speed USB device number 2 using ehci-pci
[    0.823644] usb 4-1: new high-speed USB device number 2 using ehci-pci
[    0.847634] usb 1-5: new low-speed USB device number 2 using xhci_hcd
[    1.284016] usb 1-6: new low-speed USB device number 3 using xhci_hcd
[    1.606273] usb 1-12: new high-speed USB device number 4 using xhci_hcd
[16145.244966] usb 1-2: new high-speed USB device number 5 using xhci_hcd
[16341.737992] usb 1-2: new high-speed USB device number 6 using xhci_hcd
[19857.242165] usb 1-2: new high-speed USB device number 7 using xhci_hcd
[19912.856648] usb 1-2: new high-speed USB device number 8 using xhci_hcd
[23640.528415] usb 1-2: new high-speed USB device number 9 using xhci_hcd
[119677.002573] usb 1-2: new high-speed USB device number 10 using xhci_hcd
[180140.108974] usb 1-2: new high-speed USB device number 11 using xhci_hcd

$ uname -a
Linux host1 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

On one server with F22, seems there is an USB 3.0 (xHCI) bus identified:

$ lspci | grep USB
00:14.0 USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
00:1a.0 USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #2 (rev 05)
00:1d.0 USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #1 (rev 05)

# uname -a
Linux svr1 4.2.8-200.fc22.x86_64 #1 SMP Tue Dec 15 16:50:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

On another server with CentOS 7:

$ lspci | grep USB
00:14.0 USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
00:1a.0 USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #2 (rev 05)
00:1d.0 USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #1 (rev 05)

$ uname -a
Linux svr1 3.18.41-20.el7.x86_64 #1 SMP Wed Sep 7 15:49:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *