diff options
author | Andiry Xu <andiry.xu@amd.com> | 2012-01-18 17:47:12 +0800 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-02-08 14:06:35 -0800 |
commit | 584c40e8634c0613d8e025489a71fb5218543890 (patch) | |
tree | 24b08c51038c841c0356d95048650ad08d550f72 | |
parent | a65375add9f0e6b22592960718fca36f374dc5ed (diff) |
xHCI: Cleanup isoc transfer ring when TD length mismatch found
commit cf840551a884360841bd3d3ce1ad0868ff0b759a upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I44815d510e30bcecf21f23985515a57fc4a9216e
Reviewed-on: http://git-master/r/79682
Reviewed-by: Automatic_Commit_Validation_User
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index d197bf91c455..ae99e3b32fb7 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -3374,7 +3374,8 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, /* Check TD length */ if (running_total != td_len) { xhci_err(xhci, "ISOC TD length unmatch\n"); - return -EINVAL; + ret = -EINVAL; + goto cleanup; } } |