aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/usb
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2015-12-10 02:59:29 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-24 23:16:52 -0500
commit0cdd49a1d1a483d80170d9e592f832274e8bce1b (patch)
treeac9bafe08c7d07e1e4fa97b53580d37d86137510 /include/uapi/linux/usb
parent9508e3b7a70c11370d70252147b75d3024754970 (diff)
usb: Support USB 3.1 extended port status request
usb 3.1 extend the hub get-port-status request by adding different request types. the new request types return 4 additional bytes called extended port status, these bytes are returned after the regular portstatus and portchange values. The extended port status contains a speed ID for the currently used sublink speed. A table of supported Speed IDs with details about the link is provided by the hub in the device descriptor BOS SuperSpeedPlus device capability Sublink Speed Attributes. Support this new request. Ask for the extended port status after port reset if hub supports USB 3.1. If link is running at SuperSpeedPlus set the device speed to USB_SPEED_SUPER_PLUS Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/linux/usb')
-rw-r--r--include/uapi/linux/usb/ch11.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/uapi/linux/usb/ch11.h b/include/uapi/linux/usb/ch11.h
index 331499d597fa..361297e96f58 100644
--- a/include/uapi/linux/usb/ch11.h
+++ b/include/uapi/linux/usb/ch11.h
@@ -30,6 +30,14 @@
30#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER) 30#define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER)
31 31
32/* 32/*
33 * Port status type for GetPortStatus requests added in USB 3.1
34 * See USB 3.1 spec Table 10-12
35 */
36#define HUB_PORT_STATUS 0
37#define HUB_PORT_PD_STATUS 1
38#define HUB_EXT_PORT_STATUS 2
39
40/*
33 * Hub class requests 41 * Hub class requests
34 * See USB 2.0 spec Table 11-16 42 * See USB 2.0 spec Table 11-16
35 */ 43 */
@@ -97,10 +105,13 @@
97/* 105/*
98 * Hub Status and Hub Change results 106 * Hub Status and Hub Change results
99 * See USB 2.0 spec Table 11-19 and Table 11-20 107 * See USB 2.0 spec Table 11-19 and Table 11-20
108 * USB 3.1 extends the port status request and may return 4 additional bytes.
109 * See USB 3.1 spec section 10.16.2.6 Table 10-12 and 10-15
100 */ 110 */
101struct usb_port_status { 111struct usb_port_status {
102 __le16 wPortStatus; 112 __le16 wPortStatus;
103 __le16 wPortChange; 113 __le16 wPortChange;
114 __le32 dwExtPortStatus;
104} __attribute__ ((packed)); 115} __attribute__ ((packed));
105 116
106/* 117/*
@@ -173,6 +184,16 @@ struct usb_port_status {
173#define USB_PORT_STAT_C_CONFIG_ERROR 0x0080 184#define USB_PORT_STAT_C_CONFIG_ERROR 0x0080
174 185
175/* 186/*
187 * USB 3.1 dwExtPortStatus field masks
188 * See USB 3.1 spec 10.16.2.6.3 Table 10-15
189 */
190
191#define USB_EXT_PORT_STAT_RX_SPEED_ID 0x0000000f
192#define USB_EXT_PORT_STAT_TX_SPEED_ID 0x000000f0
193#define USB_EXT_PORT_STAT_RX_LANES 0x00000f00
194#define USB_EXT_PORT_STAT_TX_LANES 0x0000f000
195
196/*
176 * wHubCharacteristics (masks) 197 * wHubCharacteristics (masks)
177 * See USB 2.0 spec Table 11-13, offset 3 198 * See USB 2.0 spec Table 11-13, offset 3
178 */ 199 */