]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.13.6/xhci-fix-wrong-endpoint-esit-value-shown-in-tracing.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.13.6 / xhci-fix-wrong-endpoint-esit-value-shown-in-tracing.patch
1 From 76a14d7bf92960aac2f5450bfd23783bfa618be9 Mon Sep 17 00:00:00 2001
2 From: Mathias Nyman <mathias.nyman@linux.intel.com>
3 Date: Mon, 18 Sep 2017 17:39:15 +0300
4 Subject: xhci: fix wrong endpoint ESIT value shown in tracing
5
6 From: Mathias Nyman <mathias.nyman@linux.intel.com>
7
8 commit 76a14d7bf92960aac2f5450bfd23783bfa618be9 upstream.
9
10 Read the endpiont ESIT from endpiont context using correct macro.
11 Add a macro for reading the high bits of ESIT for Large ESIT Payload
12 Capable hosts (LEC=1)
13
14 Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16
17 ---
18 drivers/usb/host/xhci.h | 6 ++++--
19 1 file changed, 4 insertions(+), 2 deletions(-)
20
21 --- a/drivers/usb/host/xhci.h
22 +++ b/drivers/usb/host/xhci.h
23 @@ -728,6 +728,8 @@ struct xhci_ep_ctx {
24 #define EP_MAXPSTREAMS(p) (((p) << 10) & EP_MAXPSTREAMS_MASK)
25 /* Endpoint is set up with a Linear Stream Array (vs. Secondary Stream Array) */
26 #define EP_HAS_LSA (1 << 15)
27 +/* hosts with LEC=1 use bits 31:24 as ESIT high bits. */
28 +#define CTX_TO_MAX_ESIT_PAYLOAD_HI(p) (((p) >> 24) & 0xff)
29
30 /* ep_info2 bitmasks */
31 /*
32 @@ -2452,8 +2454,8 @@ static inline const char *xhci_decode_ep
33 u8 lsa;
34 u8 hid;
35
36 - esit = EP_MAX_ESIT_PAYLOAD_HI(info) << 16 |
37 - EP_MAX_ESIT_PAYLOAD_LO(tx_info);
38 + esit = CTX_TO_MAX_ESIT_PAYLOAD_HI(info) << 16 |
39 + CTX_TO_MAX_ESIT_PAYLOAD(tx_info);
40
41 ep_state = info & EP_STATE_MASK;
42 max_pstr = info & EP_MAXPSTREAMS_MASK;