| From 6d943fe49482e42c3b76ea16a97a9ecf1042941e Mon Sep 17 00:00:00 2001 |
| From: Mathias Nyman <mathias.nyman@linux.intel.com> |
| Date: Thu, 5 Oct 2017 11:21:38 +0300 |
| Subject: [PATCH 0247/1795] xhci: add port speed ID to portsc tracing |
| |
| Shows the port speed protocol speed ID (PSID) in use. |
| speed ID may map to custom speeds, but in most cases it uses default |
| |
| 1 = Full-Speed 12 MB/s |
| 2 = Low-Speed 1.5 Mb/s |
| 3 = High-speed 480 Mb/s |
| 4 = SuperSpeed 5 Gb/s |
| 5 = SuperSpeedPlus 10 Gb/s |
| |
| Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| (cherry picked from commit 8f11487719401e20ecc58c114d9fc3177535c40a) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> |
| --- |
| drivers/usb/host/xhci.h | 5 +++-- |
| 1 file changed, 3 insertions(+), 2 deletions(-) |
| |
| diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h |
| index c9fc67a30e4c..b1ef8fe056eb 100644 |
| --- a/drivers/usb/host/xhci.h |
| +++ b/drivers/usb/host/xhci.h |
| @@ -2449,11 +2449,12 @@ static inline const char *xhci_decode_portsc(u32 portsc) |
| static char str[256]; |
| int ret; |
| |
| - ret = sprintf(str, "%s %s %s Link:%s ", |
| + ret = sprintf(str, "%s %s %s Link:%s PortSpeed:%d ", |
| portsc & PORT_POWER ? "Powered" : "Powered-off", |
| portsc & PORT_CONNECT ? "Connected" : "Not-connected", |
| portsc & PORT_PE ? "Enabled" : "Disabled", |
| - xhci_portsc_link_state_string(portsc)); |
| + xhci_portsc_link_state_string(portsc), |
| + DEV_PORT_SPEED(portsc)); |
| |
| if (portsc & PORT_OC) |
| ret += sprintf(str + ret, "OverCurrent "); |
| -- |
| 2.19.0 |
| |