This seems like a good subject to be paranoid about. :-)
It looks very good. Do you think there should be an "else" clause for
the "if ((status & STS_IAA) || !(cmd & CMD_IAAD))" test? That's the
pathway one would observe with a controller that implements IAA very
slowly or not at all. There doesn't seem to be anything more the HCD
can do about it, but you could print a log message.
There's still Bugzilla #8692. That one appears to be an individual
hardware failure, though, not a systematic bug.
There is one place where ehci-hcd.c doesn't make that guarantee:
@@ -757,7 +757,7 @@ static void unlink_async (struct ehci_hcd *eh
static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
{
/* failfast */
- if (!HC_IS_RUNNING(ehci_to_hcd(ehci)->state))
+ if (!HC_IS_RUNNING(ehci_to_hcd(ehci)->state) && ehci->reclaim)
end_unlink_async(ehci);
/* if it's not linked then there's nothing to do */
But if you take out the WARN_ON at the start of end_unlink_async then
this isn't needed.
Alan Stern
--