summaryrefslogtreecommitdiff
path: root/drivers/usb/core/sysfs.c
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2017-10-13 10:09:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-17 13:27:07 +0300
commitf2d13b02cd9647518b4397fc23fed971955ec945 (patch)
tree3eccc6808d06a90a7883b9124104994dbf015ccc /drivers/usb/core/sysfs.c
parent9718756ffd327f4a52874f4b98e77d5951011b88 (diff)
downloadlinux-f2d13b02cd9647518b4397fc23fed971955ec945.tar.xz
usb: Apply hardware LPM attributes to 3.1 device
The devices running at SuperSpeedPlus speed are also LPM capable. Apply usb3 hardware LPM attributes to those devices as well. Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/sysfs.c')
-rw-r--r--drivers/usb/core/sysfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index d930bfda4010..fa5d47da36d2 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -654,7 +654,8 @@ static int add_power_attributes(struct device *dev)
if (udev->usb2_hw_lpm_capable == 1)
rc = sysfs_merge_group(&dev->kobj,
&usb2_hardware_lpm_attr_group);
- if (udev->speed == USB_SPEED_SUPER &&
+ if ((udev->speed == USB_SPEED_SUPER ||
+ udev->speed == USB_SPEED_SUPER_PLUS) &&
udev->lpm_capable == 1)
rc = sysfs_merge_group(&dev->kobj,
&usb3_hardware_lpm_attr_group);