On Wed, 10 Sep 2003, Duncan Sands wrote: > Hi all, in 2.6 a flag is set on device disconnect that causes any > future urb submissions to fail. Then all pending urbs are "nuked". > This sounds great (especially if you want to "fire and forget" your > urbs), but does it actually work? For example, uhci-hcd does not > seem to implement the disable method, so as far as I can see > "nuking" doesn't actually do anything much - or am I confused?
You're a little confused. The disable() method that the "nuke" routine uses actually lives in core/hcd.c. It unlinks all the matching URBs and then calls the HCD's disable(). UHCI doesn't have one because it doesn't need to do anything to the hardware once the URBs are unlinked. (However a bug did turn up recently: disable() needs to wait until the unlink finishes. One of my recent -- not yet applied -- patches does that.) > I would like to be confident that urb unlinking in a disconnect > method is pointless - because the urbs have already been nuked. > Is that right? It might be better for your driver to keep track of the status of each URB. Whenever a completion routine is called, it can note that the URB is inactive. Then your disconnect handler can try to unlink any URBs that are still active -- presumably there won't be any but it doesn't hurt to make sure. Alan Stern ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
