Hi,

Alan Stern:
> I get it.  And that call to finish_unlinks is made from within the
> ohci_endpoint_disable routine.  It looks like the "clean up the list
> without looking at the hardware state" happens only when the HC isn't
> running.

Right.

> But during a normal rmmod the HC _is_ running.  So how does this
> end up solving your problem?  Does ohci-hcd somehow learn that the
> controller is _not_ running?
> 
During a normal rmmod the HC is running; however, PCMCIA is special in
that it can be pulled at any time. So the OHCI driver has a few checks
for "this only happens when the hardware is gone" results (all bits 1).

> The correct way to handle this is to change the HCD.  Not just ohci-hcd,
> but every HCD should be able to unlink URBs when the hardware isn't
> working properly.  This may require adding a timer, to check that unlinks
> complete no more than a few hundred milliseconds after they are started.  

I have added an OHCI-internal timer. It seems to work, though of course
it's still a proof-of-concept implementation, tailored to our specific
problem.

I'll have to test that one a bit more. I don't know if the problem is
sufficiently generic that a common implementation is warranted; uhci
already has a stall timer (which I haven't examined); ehci might suffer
from the same problem as the ohci driver when the card is pulled.

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  [EMAIL PROTECTED]
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
... [concerning quotation marks] even if we *did* quote anybody
in this business, it probably would be gibberish.
                -- Thom McLeod

Attachment: signature.asc
Description: Digital signature

Reply via email to