summaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2015-11-14 03:26:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-12-01 17:58:18 -0500
commitbf5ce5bf3cc7136fd7fe5e8999a580bc93a9c8f6 (patch)
treeceba9f149feb24ad8cb93bb33a2655dd59e32df8 /include/linux/usb.h
parentc56a2b2bc661fe089fde9beffeadcb0ecb5e934b (diff)
usb: core: lpm: fix usb3_hardware_lpm sysfs node
Commit 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3 hardware LPM") introduced usb3_hardware_lpm sysfs node. This doesn't show the correct status of USB3 U1 and U2 LPM status. This patch fixes this by replacing usb3_hardware_lpm with two nodes, usb3_hardware_lpm_u1 (for U1) and usb3_hardware_lpm_u2 (for U2), and recording the U1/U2 LPM status in right places. This patch should be back-ported to kernels as old as 4.3, that contains Commit 655fe4effe0f ("usbcore: add sysfs support to xHCI usb3 hardware LPM"). Cc: stable@vger.kernel.org Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index b9a28074210f..b79925dd2b41 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -511,6 +511,8 @@ struct usb3_lpm_parameters {
511 * @usb2_hw_lpm_enabled: USB2 hardware LPM is enabled 511 * @usb2_hw_lpm_enabled: USB2 hardware LPM is enabled
512 * @usb2_hw_lpm_allowed: Userspace allows USB 2.0 LPM to be enabled 512 * @usb2_hw_lpm_allowed: Userspace allows USB 2.0 LPM to be enabled
513 * @usb3_lpm_enabled: USB3 hardware LPM enabled 513 * @usb3_lpm_enabled: USB3 hardware LPM enabled
514 * @usb3_lpm_u1_enabled: USB3 hardware U1 LPM enabled
515 * @usb3_lpm_u2_enabled: USB3 hardware U2 LPM enabled
514 * @string_langid: language ID for strings 516 * @string_langid: language ID for strings
515 * @product: iProduct string, if present (static) 517 * @product: iProduct string, if present (static)
516 * @manufacturer: iManufacturer string, if present (static) 518 * @manufacturer: iManufacturer string, if present (static)
@@ -584,6 +586,8 @@ struct usb_device {
584 unsigned usb2_hw_lpm_enabled:1; 586 unsigned usb2_hw_lpm_enabled:1;
585 unsigned usb2_hw_lpm_allowed:1; 587 unsigned usb2_hw_lpm_allowed:1;
586 unsigned usb3_lpm_enabled:1; 588 unsigned usb3_lpm_enabled:1;
589 unsigned usb3_lpm_u1_enabled:1;
590 unsigned usb3_lpm_u2_enabled:1;
587 int string_langid; 591 int string_langid;
588 592
589 /* static strings from the device */ 593 /* static strings from the device */