aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-sched.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-10-15 15:05:33 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-15 15:05:33 -0700
commit59c0b586aebdfff2c79d61139a2f5ea3b6d62675 (patch)
tree2accc49ecfc9673aaeba03fc91e56611c61d4aa0 /drivers/usb/host/ehci-sched.c
parentb25eaebc6c5072164fef6f288a3e93241cc78bb7 (diff)
parent4238ef54690ea502a22aab41c377f23588c387d0 (diff)
downloadkernel_samsung_espresso10-59c0b586aebdfff2c79d61139a2f5ea3b6d62675.zip
kernel_samsung_espresso10-59c0b586aebdfff2c79d61139a2f5ea3b6d62675.tar.gz
kernel_samsung_espresso10-59c0b586aebdfff2c79d61139a2f5ea3b6d62675.tar.bz2
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: gadget: Fix EEM driver comments and VID/PID usb-storage: Workaround devices with bogus sense size USB: ehci: Fix IST boundary checking interval math. USB: option: Support for AIRPLUS MCD650 Datacard USB: whci-hcd: always do an update after processing a halted qTD USB: whci-hcd: handle early deletion of endpoints USB: wusb: don't use the stack to read security descriptor USB: rename Documentation/ABI/.../sysfs-class-usb_host
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r--drivers/usb/host/ehci-sched.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 3efa59b..b25cdea 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1400,6 +1400,10 @@ iso_stream_schedule (
goto fail;
}
+ period = urb->interval;
+ if (!stream->highspeed)
+ period <<= 3;
+
now = ehci_readl(ehci, &ehci->regs->frame_index) % mod;
/* when's the last uframe this urb could start? */
@@ -1417,8 +1421,8 @@ iso_stream_schedule (
/* Fell behind (by up to twice the slop amount)? */
if (start >= max - 2 * 8 * SCHEDULE_SLOP)
- start += stream->interval * DIV_ROUND_UP(
- max - start, stream->interval) - mod;
+ start += period * DIV_ROUND_UP(
+ max - start, period) - mod;
/* Tried to schedule too far into the future? */
if (unlikely((start + sched->span) >= max)) {
@@ -1441,10 +1445,6 @@ iso_stream_schedule (
/* NOTE: assumes URB_ISO_ASAP, to limit complexity/bugs */
- period = urb->interval;
- if (!stream->highspeed)
- period <<= 3;
-
/* find a uframe slot with enough bandwidth */
for (; start < (stream->next_uframe + period); start++) {
int enough_space;