aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2017-09-18 10:39:15 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-18 11:10:41 -0400
commit76a14d7bf92960aac2f5450bfd23783bfa618be9 (patch)
treefdd8a5eccf5667d152f60476083a8ca2e76654f1
parent114ec3a6f9096d211a4aff4277793ba969a62c73 (diff)
xhci: fix wrong endpoint ESIT value shown in tracing
Read the endpiont ESIT from endpiont context using correct macro. Add a macro for reading the high bits of ESIT for Large ESIT Payload Capable hosts (LEC=1) Cc: <stable@vger.kernel.org> # 4.12 Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/xhci.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index e96e90d0fe9f..7c87189e8110 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -735,6 +735,8 @@ struct xhci_ep_ctx {
735#define EP_MAXPSTREAMS(p) (((p) << 10) & EP_MAXPSTREAMS_MASK) 735#define EP_MAXPSTREAMS(p) (((p) << 10) & EP_MAXPSTREAMS_MASK)
736/* Endpoint is set up with a Linear Stream Array (vs. Secondary Stream Array) */ 736/* Endpoint is set up with a Linear Stream Array (vs. Secondary Stream Array) */
737#define EP_HAS_LSA (1 << 15) 737#define EP_HAS_LSA (1 << 15)
738/* hosts with LEC=1 use bits 31:24 as ESIT high bits. */
739#define CTX_TO_MAX_ESIT_PAYLOAD_HI(p) (((p) >> 24) & 0xff)
738 740
739/* ep_info2 bitmasks */ 741/* ep_info2 bitmasks */
740/* 742/*
@@ -2540,8 +2542,8 @@ static inline const char *xhci_decode_ep_context(u32 info, u32 info2, u64 deq,
2540 u8 lsa; 2542 u8 lsa;
2541 u8 hid; 2543 u8 hid;
2542 2544
2543 esit = EP_MAX_ESIT_PAYLOAD_HI(info) << 16 | 2545 esit = CTX_TO_MAX_ESIT_PAYLOAD_HI(info) << 16 |
2544 EP_MAX_ESIT_PAYLOAD_LO(tx_info); 2546 CTX_TO_MAX_ESIT_PAYLOAD(tx_info);
2545 2547
2546 ep_state = info & EP_STATE_MASK; 2548 ep_state = info & EP_STATE_MASK;
2547 max_pstr = info & EP_MAXPSTREAMS_MASK; 2549 max_pstr = info & EP_MAXPSTREAMS_MASK;