summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>2021-03-11 04:43:07 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-23 13:18:22 +0100
commitd07247ff2515d7d2db60e6492cd4662d87bf7bf2 (patch)
treed1efd8cae90d478077c8119f07b3950c6a486fd6
parentusb: core: hub: Print speed name based on ssp rate (diff)
downloadlinux-d07247ff2515d7d2db60e6492cd4662d87bf7bf2.tar.xz
linux-d07247ff2515d7d2db60e6492cd4662d87bf7bf2.zip
usb: core: sysfs: Check for SSP rate in speed attr
Check for usb_device->ssp_rate to output the signaling rate for genXxY. Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://lore.kernel.org/r/80a3214592b30da6ca95bb87984f2a9779de0b14.1615432770.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/core/sysfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index d85699bee671..5a168ba9fc51 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -167,7 +167,10 @@ static ssize_t speed_show(struct device *dev, struct device_attribute *attr,
speed = "5000";
break;
case USB_SPEED_SUPER_PLUS:
- speed = "10000";
+ if (udev->ssp_rate == USB_SSP_GEN_2x2)
+ speed = "20000";
+ else
+ speed = "10000";
break;
default:
speed = "unknown";