* [PATCH 1/1] usb: Apply hardware LPM attributes to 3.1 device
@ 2017-10-13 7:09 Lu Baolu
0 siblings, 0 replies; only message in thread
From: Lu Baolu @ 2017-10-13 7:09 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Lu Baolu
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>
---
drivers/usb/core/sysfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index d930bfd..fa5d47d 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);
--
2.7.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-13 7:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-13 7:09 [PATCH 1/1] usb: Apply hardware LPM attributes to 3.1 device Lu Baolu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome