usb: class: cdc-acm: be careful with bInterval
authorFelipe Balbi <balbi@ti.com>
Mon, 1 Jul 2013 08:23:24 +0000 (11:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2013 18:49:29 +0000 (11:49 -0700)
bInterval must be on the range 1 - 16, if we
want to pass the maximum allowed, we should
be passing 16

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c

index 9f49bfe4c6f4a24e112a71ecabee13b6e59aec0a..3e7560f004f86d7153ed3ea0eeabed09dabf6b47 100644 (file)
@@ -1295,7 +1295,7 @@ skip_countries:
                         usb_rcvintpipe(usb_dev, epctrl->bEndpointAddress),
                         acm->ctrl_buffer, ctrlsize, acm_ctrl_irq, acm,
                         /* works around buggy devices */
-                        epctrl->bInterval ? epctrl->bInterval : 0xff);
+                        epctrl->bInterval ? epctrl->bInterval : 16);
        acm->ctrlurb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
        acm->ctrlurb->transfer_dma = acm->ctrl_dma;