From a377dbed509b660e211523110554b7823b6c9e21 Mon Sep 17 00:00:00 2001 From: Sarah Sharp Date: Wed, 3 Oct 2012 11:18:05 -0700 Subject: [PATCH] --- yaml --- r: 334515 b: refs/heads/master c: ae8963adb4ad8c5f2a89ca1d99fb7bb721e7599f h: refs/heads/master i: 334513: 90a2d92937dfef157b161b5d0d3bfbc479f584e9 334511: eb6b0bcaeb7251a9dc0113582c584bed97c2b422 v: v3 --- [refs] | 2 +- trunk/drivers/usb/core/hub.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8ad1764832eb..8cc11b720dfd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d01f87c0ffa96cb44faa78710711eb6e974b891c +refs/heads/master: ae8963adb4ad8c5f2a89ca1d99fb7bb721e7599f diff --git a/trunk/drivers/usb/core/hub.c b/trunk/drivers/usb/core/hub.c index 673ee4696262..8f0478709323 100644 --- a/trunk/drivers/usb/core/hub.c +++ b/trunk/drivers/usb/core/hub.c @@ -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