# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.473 -> 1.474 # drivers/usb/media/usbvideo.c 1.19 -> 1.20 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/06/08 spse@secret.org.uk 1.474 # [PATCH] fix urb->next removal in usbvideo # # This patch removes the use of urb->next in usbvideo.c and resubmits # the URB in the completion handler. # -------------------------------------------- # diff -Nru a/drivers/usb/media/usbvideo.c b/drivers/usb/media/usbvideo.c --- a/drivers/usb/media/usbvideo.c Sat Jun 8 15:15:51 2002 +++ b/drivers/usb/media/usbvideo.c Sat Jun 8 15:15:51 2002 @@ -1802,7 +1802,7 @@ static void usbvideo_IsocIrq(struct urb *urb) { - int i, len; + int i, ret, len; uvd_t *uvd = urb->context; /* We don't want to do anything if we are about to be removed! */ @@ -1844,6 +1844,11 @@ urb->iso_frame_desc[i].status = 0; urb->iso_frame_desc[i].actual_length = 0; } + urb->status = 0; + urb->dev = uvd->dev; + ret = usb_submit_urb (urb, GFP_KERNEL); + if(ret) + err("usb_submit_urb error (%d)", ret); return; } @@ -1889,6 +1894,7 @@ urb->dev = dev; urb->context = uvd; urb->pipe = usb_rcvisocpipe(dev, uvd->video_endp); + urb->interval = 1; urb->transfer_flags = USB_ISO_ASAP; urb->transfer_buffer = uvd->sbuf[i].data; urb->complete = usbvideo_IsocIrq; @@ -1898,14 +1904,6 @@ urb->iso_frame_desc[j].offset = k; urb->iso_frame_desc[j].length = uvd->iso_packet_len; } - } - - /* Link URBs into a ring so that they invoke each other infinitely */ - for (i=0; i < USBVIDEO_NUMSBUF; i++) { - if ((i+1) < USBVIDEO_NUMSBUF) - uvd->sbuf[i].urb->next = uvd->sbuf[i+1].urb; - else - uvd->sbuf[i].urb->next = uvd->sbuf[0].urb; } /* Submit all URBs */