From: Lu Baolu Date: Fri, 13 Oct 2017 07:09:50 +0000 (+0800) Subject: usb: Apply hardware LPM attributes to 3.1 device X-Git-Tag: rel_imx_4.19.35_1.1.0~11322^2~130 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=f2d13b02cd9647518b4397fc23fed971955ec945;p=linux.git 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 Signed-off-by: Greg Kroah-Hartman --- 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);