From b067fc284667ccbcfdb6c990568a3cfd8b73bb8a Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Fri, 8 Jul 2022 12:58:57 +0100 Subject: tools: usb: testusb: Add wireless speed reporting Add the ability to detect and print the USB speed as "wireless" if/when the kernel reports that speed. Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20220708115859.2095714-2-bryan.odonoghue@linaro.org Signed-off-by: Greg Kroah-Hartman --- tools/usb/testusb.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/usb/testusb.c b/tools/usb/testusb.c index 474bae868b35..6f428f925384 100644 --- a/tools/usb/testusb.c +++ b/tools/usb/testusb.c @@ -96,7 +96,8 @@ struct usb_interface_descriptor { enum usb_device_speed { USB_SPEED_UNKNOWN = 0, /* enumerating */ USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ - USB_SPEED_HIGH /* usb 2.0 */ + USB_SPEED_HIGH, /* usb 2.0 */ + USB_SPEED_WIRELESS, /* wireless (usb 2.5) */ }; /*-------------------------------------------------------------------------*/ @@ -104,11 +105,12 @@ enum usb_device_speed { static char *speed (enum usb_device_speed s) { switch (s) { - case USB_SPEED_UNKNOWN: return "unknown"; - case USB_SPEED_LOW: return "low"; - case USB_SPEED_FULL: return "full"; - case USB_SPEED_HIGH: return "high"; - default: return "??"; + case USB_SPEED_UNKNOWN: return "unknown"; + case USB_SPEED_LOW: return "low"; + case USB_SPEED_FULL: return "full"; + case USB_SPEED_HIGH: return "high"; + case USB_SPEED_WIRELESS: return "wireless"; + default: return "??"; } } -- cgit v1.2.3 From 7fbcd99ebc0b9df7f4a9bbcfbf3e71c6bfddf9cc Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Fri, 8 Jul 2022 12:58:58 +0100 Subject: tools: usb: testusb: Add super speed reporting Add the ability to detect and print the USB speed as "super" if/when the kernel reports that speed. Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20220708115859.2095714-3-bryan.odonoghue@linaro.org Signed-off-by: Greg Kroah-Hartman --- tools/usb/testusb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools') diff --git a/tools/usb/testusb.c b/tools/usb/testusb.c index 6f428f925384..d996a3819322 100644 --- a/tools/usb/testusb.c +++ b/tools/usb/testusb.c @@ -98,6 +98,7 @@ enum usb_device_speed { USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ USB_SPEED_HIGH, /* usb 2.0 */ USB_SPEED_WIRELESS, /* wireless (usb 2.5) */ + USB_SPEED_SUPER, /* usb 3.0 */ }; /*-------------------------------------------------------------------------*/ @@ -110,6 +111,7 @@ static char *speed (enum usb_device_speed s) case USB_SPEED_FULL: return "full"; case USB_SPEED_HIGH: return "high"; case USB_SPEED_WIRELESS: return "wireless"; + case USB_SPEED_SUPER: return "super"; default: return "??"; } } -- cgit v1.2.3 From 5ea5746dfa051eaca6c79a598ff7dc4ec911cada Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Fri, 8 Jul 2022 12:58:59 +0100 Subject: tools: usb: testusb: Add super-plus speed reporting Add the ability to detect and print the USB speed as "super-plus" if/when the kernel reports that speed. Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20220708115859.2095714-4-bryan.odonoghue@linaro.org Signed-off-by: Greg Kroah-Hartman --- tools/usb/testusb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools') diff --git a/tools/usb/testusb.c b/tools/usb/testusb.c index d996a3819322..cbaa1b9fdeac 100644 --- a/tools/usb/testusb.c +++ b/tools/usb/testusb.c @@ -99,6 +99,7 @@ enum usb_device_speed { USB_SPEED_HIGH, /* usb 2.0 */ USB_SPEED_WIRELESS, /* wireless (usb 2.5) */ USB_SPEED_SUPER, /* usb 3.0 */ + USB_SPEED_SUPER_PLUS, /* usb 3.1 */ }; /*-------------------------------------------------------------------------*/ @@ -112,6 +113,7 @@ static char *speed (enum usb_device_speed s) case USB_SPEED_HIGH: return "high"; case USB_SPEED_WIRELESS: return "wireless"; case USB_SPEED_SUPER: return "super"; + case USB_SPEED_SUPER_PLUS: return "super-plus"; default: return "??"; } } -- cgit v1.2.3