Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9202
b: refs/heads/master
c: 4b2e790
h: refs/heads/master
v: v3
  • Loading branch information
David Brownell authored and Linus Torvalds committed Sep 22, 2005
1 parent d98df48 commit d8a31cb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: 2ba08e825e5a666f540bff15e9977725675e8de6
refs/heads/master: 4b2e790a4d73d729d936cc42f3b08af34f8ea5c6
16 changes: 14 additions & 2 deletions trunk/drivers/usb/host/sl811-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ static irqreturn_t sl811h_irq(struct usb_hcd *hcd, struct pt_regs *regs)
/* usb 1.1 says max 90% of a frame is available for periodic transfers.
* this driver doesn't promise that much since it's got to handle an
* IRQ per packet; irq handling latencies also use up that time.
*
* NOTE: the periodic schedule is a sparse tree, with the load for
* each branch minimized. see fig 3.5 in the OHCI spec for example.
*/
#define MAX_PERIODIC_LOAD 500 /* out of 1000 usec */

Expand Down Expand Up @@ -843,6 +846,7 @@ static int sl811h_urb_enqueue(
if (!(sl811->port1 & (1 << USB_PORT_FEAT_ENABLE))
|| !HC_IS_RUNNING(hcd->state)) {
retval = -ENODEV;
kfree(ep);
goto fail;
}

Expand Down Expand Up @@ -911,8 +915,16 @@ static int sl811h_urb_enqueue(
case PIPE_ISOCHRONOUS:
case PIPE_INTERRUPT:
urb->interval = ep->period;
if (ep->branch < PERIODIC_SIZE)
if (ep->branch < PERIODIC_SIZE) {
/* NOTE: the phase is correct here, but the value
* needs offsetting by the transfer queue depth.
* All current drivers ignore start_frame, so this
* is unlikely to ever matter...
*/
urb->start_frame = (sl811->frame & (PERIODIC_SIZE - 1))
+ ep->branch;
break;
}

retval = balance(sl811, ep->period, ep->load);
if (retval < 0)
Expand Down Expand Up @@ -1122,7 +1134,7 @@ sl811h_hub_descriptor (
desc->wHubCharacteristics = (__force __u16)cpu_to_le16(temp);

/* two bitmaps: ports removable, and legacy PortPwrCtrlMask */
desc->bitmap[0] = 1 << 1;
desc->bitmap[0] = 0 << 1;
desc->bitmap[1] = ~0;
}

Expand Down

0 comments on commit d8a31cb

Please sign in to comment.