Return-Path: Received: from mga03.intel.com ([134.134.136.65]:16184 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbbD3OOF (ORCPT ); Thu, 30 Apr 2015 10:14:05 -0400 From: Mathias Nyman To: Cc: , Mathias Nyman , Subject: [PATCH 1/3] xhci: fix isoc endpoint dequeue from advancing too far on transaction error Date: Thu, 30 Apr 2015 17:16:02 +0300 Message-Id: <1430403364-8054-2-git-send-email-mathias.nyman@linux.intel.com> In-Reply-To: <1430403364-8054-1-git-send-email-mathias.nyman@linux.intel.com> References: <1430403364-8054-1-git-send-email-mathias.nyman@linux.intel.com> Sender: stable-owner@vger.kernel.org List-ID: Isoc TDs usually consist of one TRB, sometimes two. When all goes well we receive only one success event for a TD, and move the dequeue pointer to the next TD. This fails if the TD consists of two TRBs and we get a transfer error on the first TRB, we will then see two events for that TD. Fix this by making sure the event we get is for the last TRB in that TD before moving the dequeue pointer to the next TD. This will resolve some of the uvc and dvb issues with the "ERROR Transfer event TRB DMA ptr not part of current TD" error message Cc: Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-ring.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index f5397a5..ae0894c 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2026,8 +2026,13 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td, break; case COMP_DEV_ERR: case COMP_STALL: + frame->status = -EPROTO; + skip_td = true; + break; case COMP_TX_ERR: frame->status = -EPROTO; + if (event_trb != td->last_trb) + return 0; skip_td = true; break; case COMP_STOP: -- 1.8.3.2