diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/usb/ch11.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'include/linux/usb/ch11.h')
-rw-r--r-- | include/linux/usb/ch11.h | 93 |
1 files changed, 86 insertions, 7 deletions
diff --git a/include/linux/usb/ch11.h b/include/linux/usb/ch11.h index 119194c85d10..4ebaf0824179 100644 --- a/include/linux/usb/ch11.h +++ b/include/linux/usb/ch11.h | |||
@@ -26,6 +26,14 @@ | |||
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 | ||
30 | |||
31 | /* | ||
32 | * Hub class additional requests defined by USB 3.0 spec | ||
33 | * See USB 3.0 spec Table 10-6 | ||
34 | */ | ||
35 | #define HUB_SET_DEPTH 12 | ||
36 | #define HUB_GET_PORT_ERR_COUNT 13 | ||
29 | 37 | ||
30 | /* | 38 | /* |
31 | * Hub Class feature numbers | 39 | * Hub Class feature numbers |
@@ -54,6 +62,26 @@ | |||
54 | #define USB_PORT_FEAT_TEST 21 | 62 | #define USB_PORT_FEAT_TEST 21 |
55 | #define USB_PORT_FEAT_INDICATOR 22 | 63 | #define USB_PORT_FEAT_INDICATOR 22 |
56 | #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 | ||
71 | |||
72 | /* | ||
73 | * Port feature selectors added by USB 3.0 spec. | ||
74 | * See USB 3.0 spec Table 10-7 | ||
75 | */ | ||
76 | #define USB_PORT_FEAT_LINK_STATE 5 | ||
77 | #define USB_PORT_FEAT_U1_TIMEOUT 23 | ||
78 | #define USB_PORT_FEAT_U2_TIMEOUT 24 | ||
79 | #define USB_PORT_FEAT_C_LINK_STATE 25 | ||
80 | #define USB_PORT_FEAT_C_CONFIG_ERR 26 | ||
81 | #define USB_PORT_FEAT_REMOTE_WAKE_MASK 27 | ||
82 | #define USB_PORT_FEAT_BH_PORT_RESET 28 | ||
83 | #define USB_PORT_FEAT_C_BH_PORT_RESET 29 | ||
84 | #define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30 | ||
57 | 85 | ||
58 | /* | 86 | /* |
59 | * Hub Status and Hub Change results | 87 | * Hub Status and Hub Change results |
@@ -81,12 +109,43 @@ struct usb_port_status { | |||
81 | #define USB_PORT_STAT_TEST 0x0800 | 109 | #define USB_PORT_STAT_TEST 0x0800 |
82 | #define USB_PORT_STAT_INDICATOR 0x1000 | 110 | #define USB_PORT_STAT_INDICATOR 0x1000 |
83 | /* bits 13 to 15 are reserved */ | 111 | /* bits 13 to 15 are reserved */ |
84 | #define USB_PORT_STAT_SUPER_SPEED 0x8000 /* Linux-internal */ | 112 | |
113 | /* | ||
114 | * Additions to wPortStatus bit field from USB 3.0 | ||
115 | * See USB 3.0 spec Table 10-10 | ||
116 | */ | ||
117 | #define USB_PORT_STAT_LINK_STATE 0x01e0 | ||
118 | #define USB_SS_PORT_STAT_POWER 0x0200 | ||
119 | #define USB_SS_PORT_STAT_SPEED 0x1c00 | ||
120 | #define USB_PORT_STAT_SPEED_5GBPS 0x0000 | ||
121 | /* Valid only if port is enabled */ | ||
122 | /* Bits that are the same from USB 2.0 */ | ||
123 | #define USB_SS_PORT_STAT_MASK (USB_PORT_STAT_CONNECTION | \ | ||
124 | USB_PORT_STAT_ENABLE | \ | ||
125 | USB_PORT_STAT_OVERCURRENT | \ | ||
126 | USB_PORT_STAT_RESET) | ||
127 | |||
128 | /* | ||
129 | * Definitions for PORT_LINK_STATE values | ||
130 | * (bits 5-8) in wPortStatus | ||
131 | */ | ||
132 | #define USB_SS_PORT_LS_U0 0x0000 | ||
133 | #define USB_SS_PORT_LS_U1 0x0020 | ||
134 | #define USB_SS_PORT_LS_U2 0x0040 | ||
135 | #define USB_SS_PORT_LS_U3 0x0060 | ||
136 | #define USB_SS_PORT_LS_SS_DISABLED 0x0080 | ||
137 | #define USB_SS_PORT_LS_RX_DETECT 0x00a0 | ||
138 | #define USB_SS_PORT_LS_SS_INACTIVE 0x00c0 | ||
139 | #define USB_SS_PORT_LS_POLLING 0x00e0 | ||
140 | #define USB_SS_PORT_LS_RECOVERY 0x0100 | ||
141 | #define USB_SS_PORT_LS_HOT_RESET 0x0120 | ||
142 | #define USB_SS_PORT_LS_COMP_MOD 0x0140 | ||
143 | #define USB_SS_PORT_LS_LOOPBACK 0x0160 | ||
85 | 144 | ||
86 | /* | 145 | /* |
87 | * wPortChange bit field | 146 | * wPortChange bit field |
88 | * See USB 2.0 spec Table 11-22 | 147 | * See USB 2.0 spec Table 11-22 and USB 2.0 LPM ECN Table-4.10 |
89 | * Bits 0 to 4 shown, bits 5 to 15 are reserved | 148 | * Bits 0 to 5 shown, bits 6 to 15 are reserved |
90 | */ | 149 | */ |
91 | #define USB_PORT_STAT_C_CONNECTION 0x0001 | 150 | #define USB_PORT_STAT_C_CONNECTION 0x0001 |
92 | #define USB_PORT_STAT_C_ENABLE 0x0002 | 151 | #define USB_PORT_STAT_C_ENABLE 0x0002 |
@@ -94,6 +153,13 @@ struct usb_port_status { | |||
94 | #define USB_PORT_STAT_C_OVERCURRENT 0x0008 | 153 | #define USB_PORT_STAT_C_OVERCURRENT 0x0008 |
95 | #define USB_PORT_STAT_C_RESET 0x0010 | 154 | #define USB_PORT_STAT_C_RESET 0x0010 |
96 | #define USB_PORT_STAT_C_L1 0x0020 | 155 | #define USB_PORT_STAT_C_L1 0x0020 |
156 | /* | ||
157 | * USB 3.0 wPortChange bit fields | ||
158 | * See USB 3.0 spec Table 10-11 | ||
159 | */ | ||
160 | #define USB_PORT_STAT_C_BH_RESET 0x0020 | ||
161 | #define USB_PORT_STAT_C_LINK_STATE 0x0040 | ||
162 | #define USB_PORT_STAT_C_CONFIG_ERROR 0x0080 | ||
97 | 163 | ||
98 | /* | 164 | /* |
99 | * wHubCharacteristics (masks) | 165 | * wHubCharacteristics (masks) |
@@ -128,7 +194,9 @@ struct usb_hub_status { | |||
128 | */ | 194 | */ |
129 | 195 | ||
130 | #define USB_DT_HUB (USB_TYPE_CLASS | 0x09) | 196 | #define USB_DT_HUB (USB_TYPE_CLASS | 0x09) |
197 | #define USB_DT_SS_HUB (USB_TYPE_CLASS | 0x0a) | ||
131 | #define USB_DT_HUB_NONVAR_SIZE 7 | 198 | #define USB_DT_HUB_NONVAR_SIZE 7 |
199 | #define USB_DT_SS_HUB_SIZE 12 | ||
132 | 200 | ||
133 | struct usb_hub_descriptor { | 201 | struct usb_hub_descriptor { |
134 | __u8 bDescLength; | 202 | __u8 bDescLength; |
@@ -137,11 +205,22 @@ struct usb_hub_descriptor { | |||
137 | __le16 wHubCharacteristics; | 205 | __le16 wHubCharacteristics; |
138 | __u8 bPwrOn2PwrGood; | 206 | __u8 bPwrOn2PwrGood; |
139 | __u8 bHubContrCurrent; | 207 | __u8 bHubContrCurrent; |
140 | /* add 1 bit for hub status change; round to bytes */ | ||
141 | __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
142 | __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
143 | } __attribute__ ((packed)); | ||
144 | 208 | ||
209 | /* 2.0 and 3.0 hubs differ here */ | ||
210 | union { | ||
211 | struct { | ||
212 | /* add 1 bit for hub status change; round to bytes */ | ||
213 | __u8 DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
214 | __u8 PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8]; | ||
215 | } __attribute__ ((packed)) hs; | ||
216 | |||
217 | struct { | ||
218 | __u8 bHubHdrDecLat; | ||
219 | __u16 wHubDelay; | ||
220 | __u16 DeviceRemovable; | ||
221 | } __attribute__ ((packed)) ss; | ||
222 | } u; | ||
223 | } __attribute__ ((packed)); | ||
145 | 224 | ||
146 | /* port indicator status selectors, tables 11-7 and 11-25 */ | 225 | /* port indicator status selectors, tables 11-7 and 11-25 */ |
147 | #define HUB_LED_AUTO 0 | 226 | #define HUB_LED_AUTO 0 |