login
Header Space

 
 

Re: [PATCH] usb ehci_iaa_watchdog fix

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Alan Stern <stern@...>
Cc: Mark Lord <lkml@...>, <pavel@...>, <oliver@...>, <linux-usb@...>, <linux-kernel@...>, <jikos@...>, <gregkh@...>, <akpm@...>
Date: Monday, April 7, 2008 - 7:37 pm

On Wednesday 02 April 2008, Alan Stern wrote:

The change to remove the HC_IS_RUNNING test meant that routine
would then work when hcd->state is HC_STATE_SUSPENDED or possibly
HC_STATE_RESUMING.  (Since those are the two states for which
HC_IS_RUNNING fails, other than HC_STATE_HALTED which shouldn't
be happening here...)

Now, prior to the now-merged patch that was skipping some work,
and that seemed to cause resume problems.  Making it not skip
the work made the resume behave (as did the now-merged patch).



Not exactly.  First, ehci_bus_suspend() force the timer off all
by itself ... way too early, while things can still retrigger it.
That's a buggy idiom that should be fixed.  (As you've agreed,
elsewhere.)

Second, it doesn't always call end_unlink_async() ... only when
one or more async unlink is still pending.

Third, if it *does* call end_unlink_async(), it can retriger
the timer when it needs to do another unlink.  Only when the
HC is halted (HC_STATE_HALT) is that logic bypassed, scrubbing
several endpoints at once.  (And a minor fourth point, direct
calls to end_unlink_async leaves the IAA IRQ machinery active.)

I think your fix handles the "one pending unlink" case, but
not the more general "N pending unlinks" ...



Removing the state check in the watchdog changed behavior, so the
HC must have been in one of the two states I listed above when
that watchdog fired (SUSPENDED or RESUMING).  And it had work to
do, which (because of the state check) it didn't do.



It takes care of *ONE* pending QH unlink.  If there's more than
one, it retriggers the timer, so this problem will reappear...



When the timer would be retriggered, to finish additional unlinks,
it does matter.  A complete fix for this would (a) disable the IAA
watchdog timer later, once it can never be retriggered again, and
(b) make end_unlink_async handle the multiple-unlinks case when the
HC is suspended, including not retriggering the watchdog.

- Dave




--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.25-rc7: Ugh. , Mark Lord, (Thu Mar 27, 11:29 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Thu Mar 27, 10:14 pm)
Re: 2.6.25-rc7: Ugh., Pavel Machek, (Fri Mar 28, 5:24 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Sun Mar 30, 5:04 pm)
Re: 2.6.25-rc7: Ugh., Oliver Neukum, (Mon Mar 31, 7:55 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Mon Mar 31, 10:39 am)
Re: 2.6.25-rc7: Ugh., Oliver Neukum, (Mon Mar 31, 11:04 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Mon Mar 31, 11:04 am)
Re: 2.6.25-rc7: Ugh., Oliver Neukum, (Mon Mar 31, 12:37 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Mon Mar 31, 1:03 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Mon Mar 31, 1:15 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Mon Mar 31, 1:21 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Mon Mar 31, 1:30 pm)
Re: 2.6.25-rc7: Ugh., Oliver Neukum, (Mon Mar 31, 2:05 pm)
Re: 2.6.25-rc7: Ugh., Pavel Machek, (Tue Apr 1, 5:59 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Mon Mar 31, 3:21 pm)
Re: 2.6.25-rc7: Ugh., Oliver Neukum, (Wed Apr 2, 4:04 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Wed Apr 2, 10:38 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Wed Apr 2, 10:38 am)
Re: 2.6.25-rc7: Ugh., Alan Stern, (Wed Apr 2, 11:08 am)
Re: 2.6.25-rc7: Ugh., David Brownell, (Wed Apr 2, 12:04 pm)
[PATCH] usb ehci_iaa_watchdog fix, Mark Lord, (Wed Apr 2, 12:20 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, David Brownell, (Wed Apr 2, 12:56 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, Alan Stern, (Wed Apr 2, 12:48 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, David Brownell, (Wed Apr 2, 4:31 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, Alan Stern, (Wed Apr 2, 4:55 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, David Brownell, (Wed Apr 2, 7:07 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, Mark Lord, (Wed Apr 2, 1:34 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, Mark Lord, (Wed Apr 2, 2:08 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, Alan Stern, (Wed Apr 2, 3:20 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, David Brownell, (Wed Apr 2, 4:42 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, Alan Stern, (Wed Apr 2, 5:08 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, David Brownell, (Mon Apr 7, 7:37 pm)
Re: [PATCH] usb ehci_iaa_watchdog fix, Alan Stern, (Mon Apr 7, 10:13 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Wed Apr 2, 12:09 pm)
Re: 2.6.25-rc7: Ugh., David Brownell, (Wed Apr 2, 4:22 pm)
Re: 2.6.25-rc7: Ugh. ---&gt; PATCH, Mark Lord, (Wed Apr 2, 11:44 am)
Re: 2.6.25-rc7: Ugh. ---&gt; PATCH, Alan Stern, (Wed Apr 2, 4:09 pm)
Re: 2.6.25-rc7: Ugh. ---&gt; PATCH, Mark Lord, (Wed Apr 2, 11:47 am)
Re: 2.6.25-rc7: Ugh. ---&gt; PATCH, Mark Lord, (Wed Apr 2, 11:49 am)
2.6.25-rc7/rc8 USB dead on resume, Mark Lord, (Wed Apr 2, 11:05 am)
Re: 2.6.25-rc7/rc8 USB dead on resume, Oliver Neukum, (Wed Apr 2, 11:21 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Mon Mar 31, 1:06 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Mon Mar 31, 11:14 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Sun Mar 30, 5:09 pm)
Re: 2.6.25-rc7: Ugh., Rafael J. Wysocki, (Thu Mar 27, 6:00 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Fri Mar 28, 1:22 am)
Re: 2.6.25-rc7: Ugh., Greg KH, (Thu Mar 27, 12:07 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Thu Mar 27, 10:11 pm)
Re: 2.6.25-rc7: Ugh., Alan Stern, (Fri Mar 28, 10:34 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Fri Mar 28, 10:57 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Thu Mar 27, 10:13 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Thu Mar 27, 9:51 pm)
Re: 2.6.25-rc7: Ugh., Jiri Kosina, (Thu Mar 27, 8:32 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Thu Mar 27, 9:57 pm)
Re: 2.6.25-rc7: Ugh., David Miller, (Thu Mar 27, 11:12 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Fri Mar 28, 1:46 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Fri Mar 28, 1:52 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Fri Mar 28, 2:05 am)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Fri Mar 28, 11:58 pm)
Re: 2.6.25-rc7: Ugh., David Brownell, (Fri Mar 28, 2:58 am)
Re: 2.6.25-rc7: Ugh., Ingo Molnar, (Fri Mar 28, 5:16 am)
Re: 2.6.25-rc7: Ugh., David Brownell, (Fri Mar 28, 5:49 am)
Re: 2.6.25-rc7: Ugh., Jan Engelhardt, (Fri Mar 28, 10:56 am)
Re: 2.6.25-rc7: Ugh., Adrian Bunk, (Fri Mar 28, 1:47 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Fri Mar 28, 9:47 am)
Re: Kconfig RTC selection (was: 2.6.25-rc7: Ugh.), David Brownell, (Fri Mar 28, 4:04 pm)
Re: Kconfig RTC selection (was: 2.6.25-rc7: Ugh.), Adrian Bunk, (Fri Mar 28, 5:06 pm)
Re: Kconfig RTC selection (was: 2.6.25-rc7: Ugh.), David Brownell, (Fri Mar 28, 5:23 pm)
Re: Kconfig RTC selection (was: 2.6.25-rc7: Ugh.), Adrian Bunk, (Fri Mar 28, 5:33 pm)
Re: Kconfig RTC selection (was: 2.6.25-rc7: Ugh.), David Brownell, (Fri Mar 28, 5:45 pm)
Re: Kconfig RTC selection (was: 2.6.25-rc7: Ugh.), Adrian Bunk, (Fri Mar 28, 5:59 pm)
Re: Kconfig RTC selection (was: 2.6.25-rc7: Ugh.), David Brownell, (Fri Mar 28, 6:18 pm)
Re: Kconfig RTC selection (was: 2.6.25-rc7: Ugh.), Adrian Bunk, (Fri Mar 28, 6:36 pm)
Kconfig RTC selection (was: 2.6.25-rc7: Ugh.), Tilman Schmidt, (Fri Mar 28, 8:51 am)
Re: Kconfig RTC selection (was: 2.6.25-rc7: Ugh.), David Brownell, (Fri Mar 28, 3:22 pm)
Re: Kconfig RTC selection, Tilman Schmidt, (Sat Mar 29, 8:55 am)
Re: Kconfig RTC selection, Mark Lord, (Fri Mar 28, 9:49 am)
Re: 2.6.25-rc7: Ugh., Ingo Molnar, (Fri Mar 28, 6:20 am)
Re: 2.6.25-rc7: Ugh., Jan Engelhardt, (Fri Mar 28, 11:03 am)
Re: 2.6.25-rc7: Ugh., David Brownell, (Fri Mar 28, 4:14 pm)
Re: 2.6.25-rc7: Ugh., Pavel Machek, (Fri Mar 28, 7:01 am)
Re: 2.6.25-rc7: Ugh., Mike Galbraith, (Fri Mar 28, 1:36 am)
Re: 2.6.25-rc7: Ugh., Bob Tracy, (Fri Mar 28, 12:42 am)
Re: 2.6.25-rc7: Ugh., David Miller, (Fri Mar 28, 12:56 am)
Re: 2.6.25-rc7: Ugh., Bill Davidsen, (Sat Apr 5, 2:23 pm)
Re: 2.6.25-rc7: Ugh., Bob Tracy, (Fri Mar 28, 12:34 pm)
Re: 2.6.25-rc7: Ugh., Mark Lord, (Fri Mar 28, 1:17 am)
Re: 2.6.25-rc7: Ugh., , (Fri Mar 28, 2:01 am)
speck-geostationary