ChangeSet 1.808.2.18, 2002/10/28 11:49:17-08:00, greg@kroah.com USB: fix the usb media drivers due to interrupt urb no automatic resubmission change to the usb core. diff -Nru a/drivers/usb/media/se401.c b/drivers/usb/media/se401.c --- a/drivers/usb/media/se401.c Mon Oct 28 13:53:02 2002 +++ b/drivers/usb/media/se401.c Mon Oct 28 13:53:02 2002 @@ -428,16 +428,37 @@ static void se401_button_irq(struct urb *urb) { struct usb_se401 *se401 = urb->context; + int status; if (!se401->dev) { info("ohoh: device vapourished"); return; } - if (urb->actual_length >=2 && !urb->status) { + switch (urb->status) { + case 0: + /* success */ + break; + case -ECONNRESET: + case -ENOENT: + case -ESHUTDOWN: + /* this urb is terminated, clean up */ + dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); + return; + default: + dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); + goto exit; + } + + if (urb->actual_length >=2) { if (se401->button) se401->buttonpressed=1; } +exit: + status = usb_submit_urb (urb, GFP_ATOMIC); + if (status) + err ("%s - usb_submit_urb failed with result %d", + __FUNCTION__, status); } static void se401_video_irq(struct urb *urb)