Skip to content

Commit

Permalink
xhci: add port speed ID to portsc tracing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mathias Nyman authored and Greg Kroah-Hartman committed Oct 5, 2017
1 parent 4750bc7 commit 8f11487
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/host/xhci.h
Original file line number Diff line number Diff line change
Expand Up @@ -2441,11 +2441,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 ");
Expand Down

0 comments on commit 8f11487

Please sign in to comment.