Commit 136733d6 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Greg Kroah-Hartman

USB: musb: use right poll limit for low speed devices

Remove wrongly applied upper limit on the interrupt transfer
interval for low speed devices (not much of an error per se,
according to USB specs).
Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3ecdb9ac
...@@ -1863,19 +1863,21 @@ static int musb_urb_enqueue( ...@@ -1863,19 +1863,21 @@ static int musb_urb_enqueue(
} }
qh->type_reg = type_reg; qh->type_reg = type_reg;
/* precompute rxinterval/txinterval register */ /* Precompute RXINTERVAL/TXINTERVAL register */
interval = min((u8)16, epd->bInterval); /* log encoding */
switch (qh->type) { switch (qh->type) {
case USB_ENDPOINT_XFER_INT: case USB_ENDPOINT_XFER_INT:
/* fullspeed uses linear encoding */ /*
if (USB_SPEED_FULL == urb->dev->speed) { * Full/low speeds use the linear encoding,
interval = epd->bInterval; * high speed uses the logarithmic encoding.
if (!interval) */
interval = 1; if (urb->dev->speed <= USB_SPEED_FULL) {
interval = max_t(u8, epd->bInterval, 1);
break;
} }
/* FALLTHROUGH */ /* FALLTHROUGH */
case USB_ENDPOINT_XFER_ISOC: case USB_ENDPOINT_XFER_ISOC:
/* iso always uses log encoding */ /* ISO always uses logarithmic encoding */
interval = min_t(u8, epd->bInterval, 16);
break; break;
default: default:
/* REVISIT we actually want to use NAK limits, hinting to the /* REVISIT we actually want to use NAK limits, hinting to the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment