aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
authorAndiry Xu <andiry.xu@amd.com>2012-01-18 04:47:12 -0500
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2012-01-25 15:55:19 -0500
commitcf840551a884360841bd3d3ce1ad0868ff0b759a (patch)
tree9b7dfd0feb36b73060d81d38df7b7db88aefd3e9 /drivers/usb/host/xhci-ring.c
parent7c24814f7eb9a194b11507b43ca0b947415754c2 (diff)
xHCI: Cleanup isoc transfer ring when TD length mismatch found
When a TD length mismatch is found during isoc TRB enqueue, it directly returns -EINVAL. However, isoc transfer is partially enqueued at this time, and the ring should be cleared. This should be backported to kernels as old as 2.6.36, which contain the commit 522989a27c7badb608155b1f1dea3487ed431f74 "xhci: Fix failed enqueue in the middle of isoch TD." Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r--drivers/usb/host/xhci-ring.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 5a818cbbab44..b62037bff688 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3324,7 +3324,8 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
3324 /* Check TD length */ 3324 /* Check TD length */
3325 if (running_total != td_len) { 3325 if (running_total != td_len) {
3326 xhci_err(xhci, "ISOC TD length unmatch\n"); 3326 xhci_err(xhci, "ISOC TD length unmatch\n");
3327 return -EINVAL; 3327 ret = -EINVAL;
3328 goto cleanup;
3328 } 3329 }
3329 } 3330 }
3330 3331