Skip to content

Commit

Permalink
V4L/DVB (9688): gspca: Reset the bulk URB status before resubmitting …
Browse files Browse the repository at this point in the history
…at irq level.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Dec 29, 2008
1 parent 9a23f5f commit 880ae24
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ static void fill_frame(struct gspca_dev *gspca_dev,
}

/* resubmit the URB */
urb->status = 0;
st = usb_submit_urb(urb, GFP_ATOMIC);
if (st < 0)
PDEBUG(D_ERR|D_PACK, "usb_submit_urb() ret %d", st);
Expand Down Expand Up @@ -208,7 +207,13 @@ static void bulk_irq(struct urb *urb
PDEBUG(D_PACK, "bulk irq");
if (!gspca_dev->streaming)
return;
if (urb->status != 0 && urb->status != -ECONNRESET) {
switch (urb->status) {
case 0:
break;
case -ECONNRESET:
urb->status = 0;
break;
default:
#ifdef CONFIG_PM
if (!gspca_dev->frozen)
#endif
Expand Down

0 comments on commit 880ae24

Please sign in to comment.