diff options
-rw-r--r-- | drivers/usb/host/ehci.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index fb1770d6e200..a6fd550b6903 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h | |||
@@ -181,14 +181,16 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) | |||
181 | * the async ring; just the I/O watchdog. Note that if a | 181 | * the async ring; just the I/O watchdog. Note that if a |
182 | * SHRINK were pending, OFF would never be requested. | 182 | * SHRINK were pending, OFF would never be requested. |
183 | */ | 183 | */ |
184 | if (timer_pending(&ehci->watchdog) | 184 | enum ehci_timer_action oldactions = ehci->actions; |
185 | && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF)) | ||
186 | & ehci->actions)) | ||
187 | return; | ||
188 | 185 | ||
189 | if (!test_and_set_bit (action, &ehci->actions)) { | 186 | if (!test_and_set_bit (action, &ehci->actions)) { |
190 | unsigned long t; | 187 | unsigned long t; |
191 | 188 | ||
189 | if (timer_pending(&ehci->watchdog) | ||
190 | && ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF)) | ||
191 | & oldactions)) | ||
192 | return; | ||
193 | |||
192 | switch (action) { | 194 | switch (action) { |
193 | case TIMER_IO_WATCHDOG: | 195 | case TIMER_IO_WATCHDOG: |
194 | t = EHCI_IO_JIFFIES; | 196 | t = EHCI_IO_JIFFIES; |
@@ -204,7 +206,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action) | |||
204 | t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1; | 206 | t = DIV_ROUND_UP(EHCI_SHRINK_FRAMES * HZ, 1000) + 1; |
205 | break; | 207 | break; |
206 | } | 208 | } |
207 | mod_timer(&ehci->watchdog, t + jiffies); | 209 | mod_timer(&ehci->watchdog, round_jiffies(t + jiffies)); |
208 | } | 210 | } |
209 | } | 211 | } |
210 | 212 | ||