]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
usb: xhci: fix link trb decoding
authorLu Baolu <baolu.lu@linux.intel.com>
Fri, 7 Apr 2017 14:57:10 +0000 (17:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 10:17:42 +0000 (12:17 +0200)
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>
drivers/usb/host/xhci.h

index 04e041feba3c5ef6f6c6f59501900b62bae4c4f3..4d49f5e95eae89c217e96419d5d97f31364d646f 100644 (file)
@@ -2135,14 +2135,12 @@ static inline const char *xhci_decode_trb(u32 field0, u32 field1, u32 field2,
        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: