summaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2018-04-19 12:05:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-22 10:11:19 -0400
commit013eedb8c56e55549c45df19ca56a029cc804028 (patch)
treed0372e789faebaa0cb33f25f4d1b64528e631e00 /include/linux/usb.h
parentffe95371d2a84f3ad8085656d4fcb2fc926ff7a1 (diff)
USB: Add support to store lane count used by USB 3.2
USB 3.2 specification adds Dual-lane support, doubling the maximum SuperSpeedPlus data rate from 10Gbps to 20Gbps. Dual-lane takes into use a second set of rx and tx wires/pins in the Type-C cable and connector. Add "rx_lanes" and "tx_lanes" variables to struct usb_device to store the numer of lanes in use. Number of lanes can be read using the extended port status hub request that was introduced in USB 3.1. Extended port status rx and tx lane count are zero based, maximum lanes supported by non inter-chip (SSIC) USB 3.2 is 2 (dual lane) with rx and tx lane count symmetric. SSIC devices support asymmetric lanes up to 4 lanes per direction. If extended port status is not available then default to one lane. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 0173597e59aa..beffceec4915 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -551,6 +551,8 @@ struct usb3_lpm_parameters {
551 * @route: tree topology hex string for use with xHCI 551 * @route: tree topology hex string for use with xHCI
552 * @state: device state: configured, not attached, etc. 552 * @state: device state: configured, not attached, etc.
553 * @speed: device speed: high/full/low (or error) 553 * @speed: device speed: high/full/low (or error)
554 * @rx_lanes: number of rx lanes in use, USB 3.2 adds dual-lane support
555 * @tx_lanes: number of tx lanes in use, USB 3.2 adds dual-lane support
554 * @tt: Transaction Translator info; used with low/full speed dev, highspeed hub 556 * @tt: Transaction Translator info; used with low/full speed dev, highspeed hub
555 * @ttport: device port on that tt hub 557 * @ttport: device port on that tt hub
556 * @toggle: one bit for each endpoint, with ([0] = IN, [1] = OUT) endpoints 558 * @toggle: one bit for each endpoint, with ([0] = IN, [1] = OUT) endpoints
@@ -624,6 +626,8 @@ struct usb_device {
624 u32 route; 626 u32 route;
625 enum usb_device_state state; 627 enum usb_device_state state;
626 enum usb_device_speed speed; 628 enum usb_device_speed speed;
629 unsigned int rx_lanes;
630 unsigned int tx_lanes;
627 631
628 struct usb_tt *tt; 632 struct usb_tt *tt;
629 int ttport; 633 int ttport;