Skip to content

Commit

Permalink
Revert "USB: improve ehci_watchdog's side effect in CPU power managem…
Browse files Browse the repository at this point in the history
…ent"

This reverts commit f0d781d.

It was the wrong thing to do, and does not really do what it said
it did.

Cc: Yi Yang <yi.y.yang@intel.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman authored and Greg Kroah-Hartman committed Dec 1, 2008
1 parent d9d060a commit 269f053
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions drivers/usb/host/ehci.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,14 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
* the async ring; just the I/O watchdog. Note that if a
* SHRINK were pending, OFF would never be requested.
*/
enum ehci_timer_action oldactions = ehci->actions;
if (timer_pending(&ehci->watchdog)
&& ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
& ehci->actions))
return;

if (!test_and_set_bit (action, &ehci->actions)) {
unsigned long t;

if (timer_pending(&ehci->watchdog)
&& ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
& oldactions))
return;

switch (action) {
case TIMER_IO_WATCHDOG:
t = EHCI_IO_JIFFIES;
Expand All @@ -208,7 +206,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1;
break;
}
mod_timer(&ehci->watchdog, round_jiffies(t + jiffies));
mod_timer(&ehci->watchdog, t + jiffies);
}
}

Expand Down

0 comments on commit 269f053

Please sign in to comment.