diff mbox series

[2/3] tools: usb: testusb: Add super speed reporting

Message ID 20220708115859.2095714-3-bryan.odonoghue@linaro.org
State New
Headers show
Series tools: usb: testusb: Fix reported gadget speeds | expand

Commit Message

Bryan O'Donoghue July 8, 2022, 11:58 a.m. UTC
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 <bryan.odonoghue@linaro.org>
---
 tools/usb/testusb.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/tools/usb/testusb.c b/tools/usb/testusb.c
index 6f428f9253844..d996a3819322e 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 "??";
 	}
 }