summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-q.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-29 19:43:27 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-05-29 19:43:27 -0700
commitbb7e6984ecaebe6989d0e781e303469255871432 (patch)
treea3a835653645c346c0f45e312f83f8beadc512dd /drivers/usb/host/ehci-q.c
parent185e3dead35dacb79c8cca1073fd67a26d09a0d7 (diff)
Revert "USB: EHCI: fix performance regression"
This reverts commit fa38dfcc56b5f6cce787f9aaa5d1830509213802. It wasn't really a regression and David and Alan are still working through the issues reported. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r--drivers/usb/host/ehci-q.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 5200481deb2..b85b54160cd 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -1116,7 +1116,8 @@ static void scan_async (struct ehci_hcd *ehci)
struct ehci_qh *qh;
enum ehci_timer_action action = TIMER_IO_WATCHDOG;
- ehci->stamp = ehci_readl(ehci, &ehci->regs->frame_index);
+ if (!++(ehci->stamp))
+ ehci->stamp++;
timer_action_done (ehci, TIMER_ASYNC_SHRINK);
rescan:
qh = ehci->async->qh_next.qh;
@@ -1147,14 +1148,12 @@ rescan:
* doesn't stay idle for long.
* (plus, avoids some kind of re-activation race.)
*/
- if (list_empty(&qh->qtd_list) &&
- qh->qh_state == QH_STATE_LINKED) {
- if (!ehci->reclaim &&
- ((ehci->stamp - qh->stamp) & 8191) >=
- EHCI_SHRINK_UFRAMES)
- start_unlink_async(ehci, qh);
- else
+ if (list_empty (&qh->qtd_list)) {
+ if (qh->stamp == ehci->stamp)
action = TIMER_ASYNC_SHRINK;
+ else if (!ehci->reclaim
+ && qh->qh_state == QH_STATE_LINKED)
+ start_unlink_async (ehci, qh);
}
qh = qh->qh_next.qh;