aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_host.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 23d3890fd54d..6dbbd0786a6a 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -1863,19 +1863,21 @@ static int musb_urb_enqueue(
1863 } 1863 }
1864 qh->type_reg = type_reg; 1864 qh->type_reg = type_reg;
1865 1865
1866 /* precompute rxinterval/txinterval register */ 1866 /* Precompute RXINTERVAL/TXINTERVAL register */
1867 interval = min((u8)16, epd->bInterval); /* log encoding */
1868 switch (qh->type) { 1867 switch (qh->type) {
1869 case USB_ENDPOINT_XFER_INT: 1868 case USB_ENDPOINT_XFER_INT:
1870 /* fullspeed uses linear encoding */ 1869 /*
1871 if (USB_SPEED_FULL == urb->dev->speed) { 1870 * Full/low speeds use the linear encoding,
1872 interval = epd->bInterval; 1871 * high speed uses the logarithmic encoding.
1873 if (!interval) 1872 */
1874 interval = 1; 1873 if (urb->dev->speed <= USB_SPEED_FULL) {
1874 interval = max_t(u8, epd->bInterval, 1);
1875 break;
1875 } 1876 }
1876 /* FALLTHROUGH */ 1877 /* FALLTHROUGH */
1877 case USB_ENDPOINT_XFER_ISOC: 1878 case USB_ENDPOINT_XFER_ISOC:
1878 /* iso always uses log encoding */ 1879 /* ISO always uses logarithmic encoding */
1880 interval = min_t(u8, epd->bInterval, 16);
1879 break; 1881 break;
1880 default: 1882 default:
1881 /* REVISIT we actually want to use NAK limits, hinting to the 1883 /* REVISIT we actually want to use NAK limits, hinting to the