|
@@ -3415,6 +3415,16 @@ static void usb_enable_link_state(struct usb_hcd *hcd, struct usb_device *udev,
|
|
|
enum usb3_link_state state)
|
|
|
{
|
|
|
int timeout;
|
|
|
+ __u8 u1_mel = udev->bos->ss_cap->bU1devExitLat;
|
|
|
+ __le16 u2_mel = udev->bos->ss_cap->bU2DevExitLat;
|
|
|
+
|
|
|
+ /* If the device says it doesn't have *any* exit latency to come out of
|
|
|
+ * U1 or U2, it's probably lying. Assume it doesn't implement that link
|
|
|
+ * state.
|
|
|
+ */
|
|
|
+ if ((state == USB3_LPM_U1 && u1_mel == 0) ||
|
|
|
+ (state == USB3_LPM_U2 && u2_mel == 0))
|
|
|
+ return;
|
|
|
|
|
|
/* We allow the host controller to set the U1/U2 timeout internally
|
|
|
* first, so that it can change its schedule to account for the
|