Hi Hans, This patch looks fine. I've added it to my 3.4 queue, and I'll send it to Greg shortly. And yeah, I don't know if -EPERM is the right thing to do, but I don't have a better solution. Sarah Sharp On Mon, Apr 23, 2012 at 03:06:09PM +0200, Hans de Goede wrote: > 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. > > Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> > --- > 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 6bd9d53..dbbf2cc 100644 > --- a/drivers/usb/host/xhci-ring.c > +++ b/drivers/usb/host/xhci-ring.c > @@ -1803,6 +1803,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; > -- > 1.7.10 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html