Return-Path: Received: from mga06.intel.com ([134.134.136.31]:14411 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728176AbeKJA7X (ORCPT ); Fri, 9 Nov 2018 19:59:23 -0500 From: Mathias Nyman To: Cc: usb-linus@vger.kernel.org, Sandeep Singh , stable@vger.kernel.org, Nehal Shah , Shyam Sundar S K , Mathias Nyman Subject: [PATCH 3/6] xhci: Add check for invalid byte size error when UAS devices are connected. Date: Fri, 9 Nov 2018 17:21:19 +0200 Message-Id: <1541776882-26417-4-git-send-email-mathias.nyman@linux.intel.com> In-Reply-To: <1541776882-26417-1-git-send-email-mathias.nyman@linux.intel.com> References: <1541776882-26417-1-git-send-email-mathias.nyman@linux.intel.com> Sender: stable-owner@vger.kernel.org List-ID: From: Sandeep Singh Observed "TRB completion code (27)" error which corresponds to Stopped - Length Invalid error(xhci spec section 4.17.4) while connecting USB to SATA bridge. Looks like this case was not considered when the following patch[1] was committed. Hence adding this new check which can prevent the invalid byte size error. [1] ade2e3a xhci: handle transfer events without TRB pointer Cc: Signed-off-by: Sandeep Singh cc: Nehal Shah cc: Shyam Sundar S K Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 80d464e..730a6ec 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2273,6 +2273,7 @@ static int handle_tx_event(struct xhci_hcd *xhci, goto cleanup; case COMP_RING_UNDERRUN: case COMP_RING_OVERRUN: + case COMP_STOPPED_LENGTH_INVALID: goto cleanup; default: xhci_err(xhci, "ERROR Transfer event for unknown stream ring slot %u ep %u\n", -- 2.7.4