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.
No, no! The URB's Axel is seeing are not being sent to his device; they are root hub status queries. Normally these don't show up very much
That would make sense (HZ/4) but that wasn't clear from his message.
Sounds just like one of those issues you were looking at in terms of upcoming reset/disconnect patches, now that you mention it ... :)
because they only complete when a status change event occurs. But if khubd is locked up then it can't clear the various "port changed" flags in the root hub driver, so the status query completes every time it is called -- and of course it is the same URB each time.
I wonder if it'd be useful to add some selective URB tracing machinery into usbcore. At the level of: atomic_set some device flag to turn on some level of submit/giveback dev_*() tracing for urbs going to that device (or interface). Probably with a sysfs API too.
There could be a "verbose" tell-all setting, and there could be a mode that'd only show the fault report/recovery paths (zero volume in normal usage, so safe to leave on most of the time).
I suspect that having such standardized debug/trace information would make some kinds of remote troubleshooting a lot easier ...
- 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