diff options
author | David S. Miller <davem@davemloft.net> | 2009-12-01 22:13:38 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-01 22:13:38 -0800 |
commit | ff9c38bba37937adb909cceb2a6521f2e92e17c6 (patch) | |
tree | 93bd6152d9fa28348be99ef1c788040cc7b7a94d /drivers/usb/host/ehci-sched.c | |
parent | 65c0cfafce9575319fb6f70080fbe226e5617e3b (diff) | |
parent | b2722b1c3a893ec6021508da15b32282ec79f4da (diff) | |
download | kernel-crypto-ff9c38bba37937adb909cceb2a6521f2e92e17c6.tar.gz kernel-crypto-ff9c38bba37937adb909cceb2a6521f2e92e17c6.tar.xz kernel-crypto-ff9c38bba37937adb909cceb2a6521f2e92e17c6.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/mac80211/ht.c
Diffstat (limited to 'drivers/usb/host/ehci-sched.c')
-rw-r--r-- | drivers/usb/host/ehci-sched.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index b25cdea93a1..a5535b5e3fe 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c @@ -475,6 +475,8 @@ static int enable_periodic (struct ehci_hcd *ehci) /* make sure ehci_work scans these */ ehci->next_uframe = ehci_readl(ehci, &ehci->regs->frame_index) % (ehci->periodic_size << 3); + if (unlikely(ehci->broken_periodic)) + ehci->last_periodic_enable = ktime_get_real(); return 0; } @@ -486,6 +488,16 @@ static int disable_periodic (struct ehci_hcd *ehci) if (--ehci->periodic_sched) return 0; + if (unlikely(ehci->broken_periodic)) { + /* delay experimentally determined */ + ktime_t safe = ktime_add_us(ehci->last_periodic_enable, 1000); + ktime_t now = ktime_get_real(); + s64 delay = ktime_us_delta(safe, now); + + if (unlikely(delay > 0)) + udelay(delay); + } + /* did setting PSE not take effect yet? * takes effect only at frame boundaries... */ |