aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-04-23 15:06:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-01 15:12:58 +0800
commit1a4573e4e0bb86436881b7120a80cfb63d647a0f (patch)
tree9e2cd7adb78e606c0af462423009316cb5c5a4ff /drivers/usb/host/xhci-ring.c
parent36a51c272d5b9795e1f3cb36cd31ba42a04ff9c3 (diff)
downloadkernel_samsung_smdk4412-1a4573e4e0bb86436881b7120a80cfb63d647a0f.zip
kernel_samsung_smdk4412-1a4573e4e0bb86436881b7120a80cfb63d647a0f.tar.gz
kernel_samsung_smdk4412-1a4573e4e0bb86436881b7120a80cfb63d647a0f.tar.bz2
usb-xhci: Handle COMP_TX_ERR for isoc tds
commit 9c745995ae5c4ff787f34a359de908facc11ee00 upstream. While testing unplugging an UVC HD webcam with usb-redirection (so through usbdevfs), my userspace usb-redir code was getting a value of -1 in iso_frame_desc[n].status, which according to Documentation/usb/error-codes.txt is not a valid value. The source of this -1 is the default case in xhci-ring.c:process_isoc_td() adding a kprintf there showed the value of trb_comp_code to be COMP_TX_ERR in this case, so this patch adds handling for that completion code to process_isoc_td(). This was observed and tested with the following xhci controller: 1033:0194 NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04) Note: I also wonder if setting frame->status to -1 (-EPERM) is the best we can do, but since I cannot come up with anything better I've left that as is. This patch should be backported to kernels as old as 2.6.36, which contain the commit 04e51901dd44f40a5a385ced897f6bca87d5f40a "USB: xHCI: Isochronous transfer implementation". Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r--drivers/usb/host/xhci-ring.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index c42fdff..7eab409 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1756,6 +1756,7 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
break;
case COMP_DEV_ERR:
case COMP_STALL:
+ case COMP_TX_ERR:
frame->status = -EPROTO;
skip_td = true;
break;