Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375993
b: refs/heads/master
c: 815fa7b
h: refs/heads/master
i:
  375991: a428d3f
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed May 15, 2013
1 parent c49f5a1 commit 1f01d5c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 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: e1944017839d7dfbf7329fac4bdec8b4050edf5e
refs/heads/master: 815fa7b917614261748d1ecd9600ff27f99508e5
32 changes: 18 additions & 14 deletions trunk/drivers/usb/host/ohci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,29 +240,33 @@ static int ohci_urb_enqueue (
if (unlikely(tick_before(frame, next))) {

/* USB_ISO_ASAP: Round up to the first available slot */
if (urb->transfer_flags & URB_ISO_ASAP)
if (urb->transfer_flags & URB_ISO_ASAP) {
frame += (next - frame + ed->interval - 1) &
-ed->interval;

/*
* Not ASAP: Use the next slot in the stream. If
* the entire URB falls before the threshold, fail.
*/
else if (tick_before(frame + ed->interval *
} else {
if (tick_before(frame + ed->interval *
(urb->number_of_packets - 1), next)) {
retval = -EXDEV;
usb_hcd_unlink_urb_from_ep(hcd, urb);
goto fail;
}
retval = -EXDEV;
usb_hcd_unlink_urb_from_ep(hcd, urb);
goto fail;
}

/*
* Some OHCI hardware doesn't handle late TDs
* correctly. After retiring them it proceeds to
* the next ED instead of the next TD. Therefore
* we have to omit the late TDs entirely.
*/
urb_priv->td_cnt = DIV_ROUND_UP(next - frame,
ed->interval);
/*
* Some OHCI hardware doesn't handle late TDs
* correctly. After retiring them it proceeds
* to the next ED instead of the next TD.
* Therefore we have to omit the late TDs
* entirely.
*/
urb_priv->td_cnt = DIV_ROUND_UP(
(u16) (next - frame),
ed->interval);
}
}
urb->start_frame = frame;
}
Expand Down

0 comments on commit 1f01d5c

Please sign in to comment.