Skip to contentSkip to conversation

usb: Apply hardware LPM attributes to 3.1 device

PATCH New Lu Baolu 1 participant 1 message Oct 13, 2017 USB

lore
Share & tools
lore

Lu Baolu

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/usb/core/sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/core/sysfs.c +2 -1
index d930bfd..fa5d47d 100644
@@ -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);
Signature · 1 line
2.7.4