From: Greg Kroah-Hartman Date: Tue, 25 Nov 2008 21:34:45 +0000 (-0800) Subject: Revert "USB: improve ehci_watchdog's side effect in CPU power management" X-Git-Tag: v2.6.28-rc7~32^2~6 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?p=linux-2.6-omap-h63xx.git;a=commitdiff_plain;h=269f0532332410e97e3edeb78e6cd3bb940e52b4 Revert "USB: improve ehci_watchdog's side effect in CPU power management" This reverts commit f0d781d59cb621e1795d510039df973d0f8b23fc. It was the wrong thing to do, and does not really do what it said it did. Cc: Yi Yang Cc: David Brownell Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index b11798d17ae..c7d4b5a06bd 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -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; @@ -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); } }