Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131892
b: refs/heads/master
c: 136733d
h: refs/heads/master
v: v3
  • Loading branch information
Sergei Shtylyov authored and Greg Kroah-Hartman committed Feb 27, 2009
1 parent f87e41d commit 36d1abd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ecdb9acf343bbcf2bb2c287dc524ab709cfad7e
refs/heads/master: 136733d6124a152ed2b61c3d38008c6581fc8685
18 changes: 10 additions & 8 deletions trunk/drivers/usb/musb/musb_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -1863,19 +1863,21 @@ static int musb_urb_enqueue(
}
qh->type_reg = type_reg;

/* precompute rxinterval/txinterval register */
interval = min((u8)16, epd->bInterval); /* log encoding */
/* Precompute RXINTERVAL/TXINTERVAL register */
switch (qh->type) {
case USB_ENDPOINT_XFER_INT:
/* fullspeed uses linear encoding */
if (USB_SPEED_FULL == urb->dev->speed) {
interval = epd->bInterval;
if (!interval)
interval = 1;
/*
* Full/low speeds use the linear encoding,
* high speed uses the logarithmic encoding.
*/
if (urb->dev->speed <= USB_SPEED_FULL) {
interval = max_t(u8, epd->bInterval, 1);
break;
}
/* FALLTHROUGH */
case USB_ENDPOINT_XFER_ISOC:
/* iso always uses log encoding */
/* ISO always uses logarithmic encoding */
interval = min_t(u8, epd->bInterval, 16);
break;
default:
/* REVISIT we actually want to use NAK limits, hinting to the
Expand Down

0 comments on commit 36d1abd

Please sign in to comment.