| From 248f2891d24f12be25f879ff27496cd2516de5c3 Mon Sep 17 00:00:00 2001 |
| From: Lu Baolu <baolu.lu@linux.intel.com> |
| Date: Fri, 7 Apr 2017 17:57:10 +0300 |
| Subject: [PATCH 196/286] usb: xhci: fix link trb decoding |
| |
| xhci_decode_trb() treats a link trb in the same way as that for |
| an event trb. This patch fixes this by decoding the link trb |
| according to the spec. |
| |
| Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> |
| Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| (cherry picked from commit 96d9a6eb97d77d6a3768f101f400c42743799bb2) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/usb/host/xhci.h | 12 +++++------- |
| 1 file changed, 5 insertions(+), 7 deletions(-) |
| |
| --- a/drivers/usb/host/xhci.h |
| +++ b/drivers/usb/host/xhci.h |
| @@ -2138,14 +2138,12 @@ static inline const char *xhci_decode_tr |
| switch (type) { |
| case TRB_LINK: |
| sprintf(str, |
| - "TRB %08x%08x status '%s' len %d slot %d ep %d type '%s' flags %c:%c", |
| - field1, field0, |
| - xhci_trb_comp_code_string(GET_COMP_CODE(field2)), |
| - EVENT_TRB_LEN(field2), TRB_TO_SLOT_ID(field3), |
| - /* Macro decrements 1, maybe it shouldn't?!? */ |
| - TRB_TO_EP_INDEX(field3) + 1, |
| + "LINK %08x%08x intr %d type '%s' flags %c:%c:%c:%c", |
| + field1, field0, GET_INTR_TARGET(field2), |
| xhci_trb_type_string(TRB_FIELD_TO_TYPE(field3)), |
| - field3 & EVENT_DATA ? 'E' : 'e', |
| + field3 & TRB_IOC ? 'I' : 'i', |
| + field3 & TRB_CHAIN ? 'C' : 'c', |
| + field3 & TRB_TC ? 'T' : 't', |
| field3 & TRB_CYCLE ? 'C' : 'c'); |
| break; |
| case TRB_TRANSFER: |