On Wednesday 05 July 2006 7:56 am, Christopher Montgomery wrote:

> The resubmission is in ehci-q.c:qh_completions(); it is not checking
> to see if the device is disconnected (is this possible?) before
> deciding the endpoint EPROTO fault calls for tearing it down and
> setting it back up. 

To repeat myself:  the instant the physical disconnect happens,
then pending transfers to that device's endpoints may trigger
USB transfer errors.  And that can happen a LONG time before any
component of the USB stack (e.g. qh_completions) can know that
there was a disconnect.


If you think qh_completions() tears down endpoints, re-read it;
there is in fact a fair amount of effort to avoid doing that
(in favor of just leaving the QH marked "halted") because of
low level races that could trigger.

And in any case, the only way qh_completions would reactivate
a halted endpoint is if its queue were non-empty after a fault
got reported.  And that's solidly in the hands of the driver
which filled that queue.  If the queue is logically one big
transfer, then the driver must already abort it on any fault.

Otherwise, network-type drivers generally are smart enough to
check urb->status and understand that certain codes are likely
to indicate that a disconnect is pending, and back off queueing
new URBs in case that's the fault's root cause.

Sure, there are a few cases where the HCD could tell that the
device is marked "gone" and add a special fail-fast path.  But
that's not necessary either.


> Active/submitted URBs potentially have nothing to 
> do with it; it is happening even when my devices are idle.

I don't follow.  If the device is idle, then there are no
URBs going to it, so qh_completions() will never be called.
When there's an URB queued, the device is actively polled.

- Dave


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to