The USB 3.2 specification adds support for Dual-lane, doubling the
maximum rate to 20Gbps by taking into use another set of rx and tx
wires and pins in the Type-C cable and connector.

The changes to support this in USB core and xhci driver seems to be minor.
USB 3.1 support already added the extended port status request returning
lane count. it just wasn't used before.

I'd like to use these patches to start a discussion about which items
regarding Dual-lane and USB 3.2 should be exposed to userspace and how.

These patches add a variable "lanes" to store the number of lanes
in use, and adds the Gen XxY notion to the string displayed when a new
device is connected. X in Gen XxY stands for signaling rate,
Y for lane count, as described in the USB 3.2 specification.

Example for clarification:
Gen 1x1 = 5Gbps, SuperSpeed, one lane, same as USB3.0, and USB 3.1 Gen1
Gen 2x1 = 10Gbps, SuperSpeedPlus, one lane, same as USB 3.1 Gen2
Gen 1x2 = 10Gbps, SuperSpeed, Dual-lane (2 x 5Gbps)
Gen 2x2 = 20Gbps, SuperSpeedPlus, Dual-lane (2 x 10Gbps)

For normal, cable connected USB devices I think it boils down to a
few cases on what is useful to expose:

1. printing Gen XxY as part "new %s USB device number. " message at
   port init. Patch 2/2 adds this.

2. Would a sysfs entry with the Gen XxY information be useful?

3. Would a sysfs entry for lane count be useful?

4. Should the "speed" sysfs entry be more accurate? USB 3.1 and later
   can list different supported lane speeds other than the 5Gbps or 10Gbps.
   actual port speed would be lane count * current lane speed in use.
   Or do we just keep it simple and show the maximum signaling
   rate * lane count, i.e. 5000, 10000 or 20000?

For Integrated, not cable connected SSIC (SuperSpeed Inter-Chip) USB
devices it gets a bit more complicated. SSIC devices can be asymetric
having different lane counts for rx and tx lanes, and support up to x4 lanes.
SSIC devices support max 5Gbps signaling rate on a lane (SuperSpeed).

We would need separate rx and rx lane counts and speed parameters, and
SSIC don't map well to the Gen XxY notion in USB 3.2 either.

One option would be to just show the maximum for SSIC devices,
speed = max(rx_lane, tx_lane) * lane_speed
lanes = max(rx_lane, tx_lane)  (if lanes sysfs is added)
and show "SSIC" instead of "Gen XxY" for asymetric lane SSIC devices,
skipping details on rx and tx lane counts.


Mathias Nyman (2):
  USB: Add support to store lane count used by USB 3.2
  USB: show USB3 Gen XxY version during device enumeration

 drivers/usb/core/hub.c | 10 +++++++++-
 include/linux/usb.h    |  2 ++
 2 files changed, 11 insertions(+), 1 deletion(-)


To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to
More majordomo info at

Reply via email to