usb: core: lpm: fix usb3_hardware_lpm sysfs node
authorLu Baolu <baolu.lu@linux.intel.com>
Sat, 14 Nov 2015 08:26:32 +0000 (16:26 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Jan 2016 19:28:58 +0000 (11:28 -0800)
commit877764274280a69a888e1fdb18d411b36dc25c31
treeea17907ca697401362e1fd2fc0a98da86379276e
parent739d010005bbb8107f06135d06f1d9b88c9942b5
usb: core: lpm: fix usb3_hardware_lpm sysfs node

commit bf5ce5bf3cc7136fd7fe5e8999a580bc93a9c8f6 upstream.

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").

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/sysfs-bus-usb
Documentation/usb/power-management.txt
drivers/usb/core/hub.c
drivers/usb/core/sysfs.c
include/linux/usb.h