diff options
Diffstat (limited to 'include/linux/usb')
| -rw-r--r-- | include/linux/usb/ch11.h | 41 |
1 files changed, 37 insertions, 4 deletions
diff --git a/include/linux/usb/ch11.h b/include/linux/usb/ch11.h index 38c42b01364..22afcd37bc3 100644 --- a/include/linux/usb/ch11.h +++ b/include/linux/usb/ch11.h | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #define HUB_RESET_TT 9 | 26 | #define HUB_RESET_TT 9 |
| 27 | #define HUB_GET_TT_STATE 10 | 27 | #define HUB_GET_TT_STATE 10 |
| 28 | #define HUB_STOP_TT 11 | 28 | #define HUB_STOP_TT 11 |
| 29 | #define HUB_SET_DEPTH 12 | ||
| 29 | 30 | ||
| 30 | /* | 31 | /* |
| 31 | * Hub class additional requests defined by USB 3.0 spec | 32 | * Hub class additional requests defined by USB 3.0 spec |
| @@ -61,6 +62,12 @@ | |||
| 61 | #define USB_PORT_FEAT_TEST 21 | 62 | #define USB_PORT_FEAT_TEST 21 |
| 62 | #define USB_PORT_FEAT_INDICATOR 22 | 63 | #define USB_PORT_FEAT_INDICATOR 22 |
| 63 | #define USB_PORT_FEAT_C_PORT_L1 23 | 64 | #define USB_PORT_FEAT_C_PORT_L1 23 |
| 65 | #define USB_PORT_FEAT_C_PORT_LINK_STATE 25 | ||
| 66 | #define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26 | ||
| 67 | #define USB_PORT_FEAT_PORT_REMOTE_WAKE_MASK 27 | ||
| 68 | #define USB_PORT_FEAT_BH_PORT_RESET 28 | ||
| 69 | #define USB_PORT_FEAT_C_BH_PORT_RESET 29 | ||
| 70 | #define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30 | ||
| 64 | 71 | ||
| 65 | /* | 72 | /* |
| 66 | * Port feature selectors added by USB 3.0 spec. | 73 | * Port feature selectors added by USB 3.0 spec. |
| @@ -110,8 +117,14 @@ struct usb_port_status { | |||
| 110 | */ | 117 | */ |
| 111 | #define USB_PORT_STAT_LINK_STATE 0x01e0 | 118 | #define USB_PORT_STAT_LINK_STATE 0x01e0 |
| 112 | #define USB_SS_PORT_STAT_POWER 0x0200 | 119 | #define USB_SS_PORT_STAT_POWER 0x0200 |
| 120 | #define USB_SS_PORT_STAT_SPEED 0x1c00 | ||
| 113 | #define USB_PORT_STAT_SPEED_5GBPS 0x0000 | 121 | #define USB_PORT_STAT_SPEED_5GBPS 0x0000 |
| 114 | /* Valid only if port is enabled */ | 122 | /* Valid only if port is enabled */ |
| 123 | /* Bits that are the same from USB 2.0 */ | ||
| 124 | #define USB_SS_PORT_STAT_MASK (USB_PORT_STAT_CONNECTION | \ | ||
| 125 | USB_PORT_STAT_ENABLE | \ | ||
| 126 | USB_PORT_STAT_OVERCURRENT | \ | ||
| 127 | USB_PORT_STAT_RESET) | ||
| 115 | 128 | ||
| 116 | /* | 129 | /* |
| 117 | * Definitions for PORT_LINK_STATE values | 130 | * Definitions for PORT_LINK_STATE values |
| @@ -141,6 +154,13 @@ struct usb_port_status { | |||
| 141 | #define USB_PORT_STAT_C_OVERCURRENT 0x0008 | 154 | #define USB_PORT_STAT_C_OVERCURRENT 0x0008 |
| 142 | #define USB_PORT_STAT_C_RESET 0x0010 | 155 | #define USB_PORT_STAT_C_RESET 0x0010 |
| 143 | #define USB_PORT_STAT_C_L1 0x0020 | 156 | #define USB_PORT_STAT_C_L1 0x0020 |
| 157 | /* | ||
| 158 | * USB 3.0 wPortChange bit fields | ||
| 159 | * See USB 3.0 spec Table 10-11 | ||
| 160 | */ | ||
| 161 | #define USB_PORT_STAT_C_BH_RESET 0x0020 | ||
| 162 | #define USB_PORT_STAT_C_LINK_STATE 0x0040 | ||
| 163 | #define USB_PORT_STAT_C_CONFIG_ERROR 0x0080 | ||
| 144 | 164 | ||
| 145 | /* | 165 | /* |
| 146 | * wHubCharacteristics (masks) | 166 | * wHubCharacteristics (masks) |
| @@ -175,7 +195,9 @@ struct usb_hub_status { | |||
| 175 | */ | 195 | */ |
| 176 | 196 | ||
| 177 | #define USB_DT_HUB (USB_TYPE_CLASS | 0x09) | 197 | #define USB_DT_HUB (USB_TYPE_CLASS | 0x09) |
| 198 | #define USB_DT_SS_HUB (USB_TYPE_CLASS | 0x0a) | ||
| 178 | #define USB_DT_HUB_NONVAR_SIZE 7 | 199 | #define USB_DT_HUB_NONVAR_SIZE 7 |
| 200 | #define USB_DT_SS_HUB_SIZE 12 | ||
| 179 | 201 | ||
| 180 | struct usb_hub_descriptor { | 202 | struct usb_hub_descriptor { |
| 181 | __u8 bDescLength; | 203 | __u8 bDescLength; |
| @@ -184,11 +206,22 @@ struct usb_hub_descriptor { | |||
| 184 | __le16 wHubCharacteristics; | 206 | __le16 wHubCharacteristics; |
| 185 | __u8 bPwrOn2PwrGood; | 207 | __u8 bPwrOn2PwrGood; |
| 186 | __u8 bHubContrCurrent; | 208 | __u8 bHubContrCurrent; |
| 187 | /* add 1 bit for hub status change; round to bytes */ | ||
| 188 | __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
| 189 | __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
| 190 | } __attribute__ ((packed)); | ||
| 191 | 209 | ||
| 210 | /* 2.0 and 3.0 hubs differ here */ | ||
| 211 | union { | ||
| 212 | struct { | ||
| 213 | /* add 1 bit for hub status change; round to bytes */ | ||
| 214 | __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
| 215 | __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
| 216 | } __attribute__ ((packed)) hs; | ||
| 217 | |||
| 218 | struct { | ||
| 219 | __u8 bHubHdrDecLat; | ||
| 220 | __u16 wHubDelay; | ||
| 221 | __u16 DeviceRemovable; | ||
| 222 | } __attribute__ ((packed)) ss; | ||
| 223 | } u; | ||
| 224 | } __attribute__ ((packed)); | ||
| 192 | 225 | ||
| 193 | /* port indicator status selectors, tables 11-7 and 11-25 */ | 226 | /* port indicator status selectors, tables 11-7 and 11-25 */ |
| 194 | #define HUB_LED_AUTO 0 | 227 | #define HUB_LED_AUTO 0 |
