diff options
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 7ee1b5c3b4cb..447fe29b55b4 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -205,6 +205,32 @@ void usb_put_intf(struct usb_interface *intf); | |||
205 | #define USB_MAXINTERFACES 32 | 205 | #define USB_MAXINTERFACES 32 |
206 | #define USB_MAXIADS (USB_MAXINTERFACES/2) | 206 | #define USB_MAXIADS (USB_MAXINTERFACES/2) |
207 | 207 | ||
208 | /* | ||
209 | * USB Resume Timer: Every Host controller driver should drive the resume | ||
210 | * signalling on the bus for the amount of time defined by this macro. | ||
211 | * | ||
212 | * That way we will have a 'stable' behavior among all HCDs supported by Linux. | ||
213 | * | ||
214 | * Note that the USB Specification states we should drive resume for *at least* | ||
215 | * 20 ms, but it doesn't give an upper bound. This creates two possible | ||
216 | * situations which we want to avoid: | ||
217 | * | ||
218 | * (a) sometimes an msleep(20) might expire slightly before 20 ms, which causes | ||
219 | * us to fail USB Electrical Tests, thus failing Certification | ||
220 | * | ||
221 | * (b) Some (many) devices actually need more than 20 ms of resume signalling, | ||
222 | * and while we can argue that's against the USB Specification, we don't have | ||
223 | * control over which devices a certification laboratory will be using for | ||
224 | * certification. If CertLab uses a device which was tested against Windows and | ||
225 | * that happens to have relaxed resume signalling rules, we might fall into | ||
226 | * situations where we fail interoperability and electrical tests. | ||
227 | * | ||
228 | * In order to avoid both conditions, we're using a 40 ms resume timeout, which | ||
229 | * should cope with both LPJ calibration errors and devices not following every | ||
230 | * detail of the USB Specification. | ||
231 | */ | ||
232 | #define USB_RESUME_TIMEOUT 40 /* ms */ | ||
233 | |||
208 | /** | 234 | /** |
209 | * struct usb_interface_cache - long-term representation of a device interface | 235 | * struct usb_interface_cache - long-term representation of a device interface |
210 | * @num_altsetting: number of altsettings defined. | 236 | * @num_altsetting: number of altsettings defined. |