]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: Apply hardware LPM attributes to 3.1 device
authorLu Baolu <baolu.lu@linux.intel.com>
Fri, 13 Oct 2017 07:09:50 +0000 (15:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Oct 2017 10:27:07 +0000 (12:27 +0200)
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>
drivers/usb/core/sysfs.c

index d930bfda40101457dad980ec432c0b73d7193981..fa5d47da36d27ac67e6648c57c49a3460c11476b 100644 (file)
@@ -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);