From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbdBOCgj (ORCPT ); Tue, 14 Feb 2017 21:36:39 -0500 Received: from mga11.intel.com ([192.55.52.93]:22123 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751532AbdBOCfz (ORCPT ); Tue, 14 Feb 2017 21:35:55 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,163,1484035200"; d="scan'208";a="225420877" From: Lu Baolu To: Mathias Nyman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH 5/6] usb: xhci: fix link trb decoding Date: Wed, 15 Feb 2017 10:35:11 +0800 Message-Id: <1487126112-6069-6-git-send-email-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1487126112-6069-1-git-send-email-baolu.lu@linux.intel.com> References: <1487126112-6069-1-git-send-email-baolu.lu@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/usb/host/xhci.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index ef4a342..ff12c8a 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -2159,14 +2159,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: -- 2.1.4