summaryrefslogtreecommitdiff
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2015-05-12 14:53:40 +0800
committerAlex Shi <alex.shi@linaro.org>2015-05-12 14:53:40 +0800
commit8134585f1c33565ea5e752a7ba9323ed3e0921f3 (patch)
tree1fd22479884783bb498702169de744b513dd68f7 /include/linux/usb.h
parent05f74e8baccb60882ace4d0165887368e8143f3f (diff)
parent9182148a5315d4b1de68ac74fd54cbb5da5a3703 (diff)
Merge tag 'v3.10.77' into linux-linaro-lsk
This is the 3.10.77 stable release Conflicts: drivers/video/console/Kconfig scripts/kconfig/menu.c
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index a0bee5a28d1..28bd3a898cb 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -206,6 +206,32 @@ void usb_put_intf(struct usb_interface *intf);
#define USB_MAXINTERFACES 32
#define USB_MAXIADS (USB_MAXINTERFACES/2)
+/*
+ * USB Resume Timer: Every Host controller driver should drive the resume
+ * signalling on the bus for the amount of time defined by this macro.
+ *
+ * That way we will have a 'stable' behavior among all HCDs supported by Linux.
+ *
+ * Note that the USB Specification states we should drive resume for *at least*
+ * 20 ms, but it doesn't give an upper bound. This creates two possible
+ * situations which we want to avoid:
+ *
+ * (a) sometimes an msleep(20) might expire slightly before 20 ms, which causes
+ * us to fail USB Electrical Tests, thus failing Certification
+ *
+ * (b) Some (many) devices actually need more than 20 ms of resume signalling,
+ * and while we can argue that's against the USB Specification, we don't have
+ * control over which devices a certification laboratory will be using for
+ * certification. If CertLab uses a device which was tested against Windows and
+ * that happens to have relaxed resume signalling rules, we might fall into
+ * situations where we fail interoperability and electrical tests.
+ *
+ * In order to avoid both conditions, we're using a 40 ms resume timeout, which
+ * should cope with both LPJ calibration errors and devices not following every
+ * detail of the USB Specification.
+ */
+#define USB_RESUME_TIMEOUT 40 /* ms */
+
/**
* struct usb_interface_cache - long-term representation of a device interface
* @num_altsetting: number of altsettings defined.