* [PATCH] USB: add new speed value to USB debugfs
@ 2023-08-18 15:35 Dingyan Li
2023-08-20 6:30 ` Dingyan Li
0 siblings, 1 reply; 2+ messages in thread
From: Dingyan Li @ 2023-08-18 15:35 UTC (permalink / raw
To: gregkh, stern; +Cc: linux-usb, linux-kernel
Current max speed supported in USB debugfs is 10000.
Since USB 3.2 GEN_2x2 has reached 20000, it's better
to add it. The idea is borrowed from USB sysfs, with
a combination of USB_SPEED_SUPER_PLUS and
USB_SSP_GEN_2x2, the actual speed should be 20000.
Signed-off-by: Dingyan Li <18500469033@163.com>
---
drivers/usb/core/devices.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
index a247da73f34d..78ebcb657dce 100644
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -429,7 +429,11 @@ static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes,
case USB_SPEED_SUPER:
speed = "5000"; break;
case USB_SPEED_SUPER_PLUS:
- speed = "10000"; break;
+ if (usbdev->ssp_rate == USB_SSP_GEN_2x2)
+ speed = "20000";
+ else
+ speed = "10000";
+ break;
default:
speed = "??";
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re:[PATCH] USB: add new speed value to USB debugfs
2023-08-18 15:35 [PATCH] USB: add new speed value to USB debugfs Dingyan Li
@ 2023-08-20 6:30 ` Dingyan Li
0 siblings, 0 replies; 2+ messages in thread
From: Dingyan Li @ 2023-08-20 6:30 UTC (permalink / raw
To: gregkh, stern; +Cc: linux-usb, linux-kernel
At 2023-08-18 23:35:09, "Dingyan Li" <18500469033@163.com> wrote:
>Current max speed supported in USB debugfs is 10000.
>Since USB 3.2 GEN_2x2 has reached 20000, it's better
>to add it. The idea is borrowed from USB sysfs, with
>a combination of USB_SPEED_SUPER_PLUS and
>USB_SSP_GEN_2x2, the actual speed should be 20000.
>
>Signed-off-by: Dingyan Li <18500469033@163.com>
>---
> drivers/usb/core/devices.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
>index a247da73f34d..78ebcb657dce 100644
>--- a/drivers/usb/core/devices.c
>+++ b/drivers/usb/core/devices.c
>@@ -429,7 +429,11 @@ static ssize_t usb_device_dump(char __user **buffer, size_t *nbytes,
> case USB_SPEED_SUPER:
> speed = "5000"; break;
> case USB_SPEED_SUPER_PLUS:
>- speed = "10000"; break;
>+ if (usbdev->ssp_rate == USB_SSP_GEN_2x2)
>+ speed = "20000";
>+ else
>+ speed = "10000";
>+ break;
> default:
> speed = "??";
> }
>--
>2.25.1
Please ignore this patch, which will be covered in another patch.
Sorry for the inconvenience.
Regards,
Dingyan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-20 6:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-18 15:35 [PATCH] USB: add new speed value to USB debugfs Dingyan Li
2023-08-20 6:30 ` Dingyan Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).