Axel Waggershauser wrote:
On Tue, 2004-01-13 at 16:36, Alan Stern wrote:

I still have these printks in giveback() and found to my surprise that
this function gets called repeatedly for an other urb with a frequency
of about 4/sec. This starts about the same time the unplugging is
detected, that means shortly after I see the "uhci_hcd 0000:00:07.2:
shutdown urb" and keeps on endlessly. At that time there is no usb

"Endlessly"?? I'd expect to see one message for each URB queued to each endpoint on that device. Anything else indicates a bug. Looping on one urb? Aha!

With device state USB_STATE_NOTATTACHED, no new URBs may be queued;
and the only state change allowed for the ones now queued is to be
given back -- just once! -- through the completion function.

Is your device driver handling -ESHUTDOWN, -ENOENT, and -ECONNRESET
(for urb->status) the same?  They're all different kinds of shutdown
request, either from your usbcore or (the latter two) your driver.


device attached to the machine. Maybe this behavior is part of the
problem or a hint where to search next?

Maybe. It indicates the the hub driver is stuck waiting for something; most likely it's waiting for your driver to return from a call to its
disconnect routine.


That fits quite well with what I see. I switched back to my synchronous
unlinking and now the these giveback() calls end as soon as disconnect()
returns.

Which is completely bizarre. If all you changed was whether or not you used URB_UNLINK_ASYNC, and you kept _correct_ logic to wait for all of your urb completions (including cancelations), all that would do is add a duplicate synchronization point. Which by definition is not necessary. One can hope this is all from just one bug, not a complex of them.

- Dave





-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to