Skip to content

Commit

Permalink
tools: usb: testusb: Add super-plus speed reporting
Browse files Browse the repository at this point in the history
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 <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20220708115859.2095714-4-bryan.odonoghue@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Bryan O'Donoghue authored and Greg Kroah-Hartman committed Jul 8, 2022
1 parent 7fbcd99 commit 5ea5746
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/usb/testusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

/*-------------------------------------------------------------------------*/
Expand All @@ -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 "??";
}
}
Expand Down

0 comments on commit 5ea5746

Please sign in to comment.