aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2013-10-08 11:28:43 -0400
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2013-10-16 15:24:21 -0400
commitf468f7b9467b285b87ea61e2a3c8c0e641117b0e (patch)
tree5c74b9778be3be051cd865b5e8a4906cc0347ecd /drivers/usb/core
parent890dae88672175f1d39f6105444d9bdc71c89258 (diff)
usb: Push USB2 LPM disable on disconnect into USB core.
The USB core currently handles enabling and disabling optional USB power management features during device transitions (device suspend/resume, driver bind/unbind, device reset, and device disconnect). Those optional power features include Latency Tolerance Messaging (LTM), USB 3.0 Link PM, and USB 2.0 Link PM. The USB core currently enables LPM on device enumeration and disables USB 2.0 Link PM when the device is reset. However, the xHCI driver disables LPM when the device is disconnected and the device context is freed. Push the call up into the USB core, in order to be consistent with the core handling all power management enabling and disabling. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/message.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 82927e1ed27d..bb315970e475 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -1182,8 +1182,12 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
1182 put_device(&dev->actconfig->interface[i]->dev); 1182 put_device(&dev->actconfig->interface[i]->dev);
1183 dev->actconfig->interface[i] = NULL; 1183 dev->actconfig->interface[i] = NULL;
1184 } 1184 }
1185
1186 if (dev->usb2_hw_lpm_enabled == 1)
1187 usb_set_usb2_hardware_lpm(dev, 0);
1185 usb_unlocked_disable_lpm(dev); 1188 usb_unlocked_disable_lpm(dev);
1186 usb_disable_ltm(dev); 1189 usb_disable_ltm(dev);
1190
1187 dev->actconfig = NULL; 1191 dev->actconfig = NULL;
1188 if (dev->state == USB_STATE_CONFIGURED) 1192 if (dev->state == USB_STATE_CONFIGURED)
1189 usb_set_device_state(dev, USB_STATE_ADDRESS); 1193 usb_set_device_state(dev, USB_STATE_ADDRESS);