usb: core: lpm: fix usb3_hardware_lpm sysfs node
Commit655fe4effe
("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 Commit655fe4effe
("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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
c56a2b2bc6
commit
bf5ce5bf3c
@@ -511,6 +511,8 @@ struct usb3_lpm_parameters {
|
||||
* @usb2_hw_lpm_enabled: USB2 hardware LPM is enabled
|
||||
* @usb2_hw_lpm_allowed: Userspace allows USB 2.0 LPM to be enabled
|
||||
* @usb3_lpm_enabled: USB3 hardware LPM enabled
|
||||
* @usb3_lpm_u1_enabled: USB3 hardware U1 LPM enabled
|
||||
* @usb3_lpm_u2_enabled: USB3 hardware U2 LPM enabled
|
||||
* @string_langid: language ID for strings
|
||||
* @product: iProduct string, if present (static)
|
||||
* @manufacturer: iManufacturer string, if present (static)
|
||||
@@ -584,6 +586,8 @@ struct usb_device {
|
||||
unsigned usb2_hw_lpm_enabled:1;
|
||||
unsigned usb2_hw_lpm_allowed:1;
|
||||
unsigned usb3_lpm_enabled:1;
|
||||
unsigned usb3_lpm_u1_enabled:1;
|
||||
unsigned usb3_lpm_u2_enabled:1;
|
||||
int string_langid;
|
||||
|
||||
/* static strings from the device */
|
||||
|
Reference in New Issue
Block a user