From: Jean-François Moine Date: Wed, 10 Aug 2011 10:28:44 +0000 (-0300) Subject: [media] gspca - main: Fix the isochronous transfer interval X-Git-Tag: firefly_0821_release~3680^2~4256^2~177 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=480992b357d153b8417ba242fc43e96d90cff94c;p=firefly-linux-kernel-4.4.55.git [media] gspca - main: Fix the isochronous transfer interval For USB speeds different of 'low', the bInterval value is logarithmic. Signed-off-by: Jean-François Moine Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index a3c2d36da0c8..85d24696db26 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -754,7 +754,10 @@ static int create_urbs(struct gspca_dev *gspca_dev, ep->desc.bEndpointAddress); urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP; - urb->interval = ep->desc.bInterval; + if (gspca_dev->dev->speed == USB_SPEED_LOW) + urb->interval = ep->desc.bInterval; + else + urb->interval = 1 << (ep->desc.bInterval - 1); urb->complete = isoc_irq; urb->number_of_packets = npkt; for (i = 0; i < npkt; i++) {