summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorKevin Strasser <kevin.strasser@linux.intel.com>2015-06-16 10:35:30 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-22 15:45:03 -0700
commit655fe4effe0f1f40e4f6ca6b3cc64a7fe0032183 (patch)
tree00e7be3af68a08b25e6688fc8d4571124b81d704 /drivers/usb/core/hub.c
parenteb4861c3cef7f745df0d2a26b0f4287da0190424 (diff)
downloadlinux-655fe4effe0f1f40e4f6ca6b3cc64a7fe0032183.tar.gz
linux-655fe4effe0f1f40e4f6ca6b3cc64a7fe0032183.tar.bz2
linux-655fe4effe0f1f40e4f6ca6b3cc64a7fe0032183.zip
usbcore: add sysfs support to xHCI usb3 hardware LPM
Add a sysfs node to make it easier to verify if LPM is supported and being enabled for USB 3.0 devices. Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 43cb2f2e3b43..d9ce8f9d9acc 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3950,6 +3950,8 @@ int usb_disable_lpm(struct usb_device *udev)
if (usb_disable_link_state(hcd, udev, USB3_LPM_U2))
goto enable_lpm;
+ udev->usb3_lpm_enabled = 0;
+
return 0;
enable_lpm:
@@ -4007,6 +4009,8 @@ void usb_enable_lpm(struct usb_device *udev)
usb_enable_link_state(hcd, udev, USB3_LPM_U1);
usb_enable_link_state(hcd, udev, USB3_LPM_U2);
+
+ udev->usb3_lpm_enabled = 1;
}
EXPORT_SYMBOL_GPL(usb_enable_lpm);