On Fri, 22 Nov 2024 14:28:58 -0500, Alan Stern wrote: > Bypassing the BH might not be a good idea, because driver's > completion handlers expect to be called in order of URB completion. > It probably wouldn't make any difference, but it's hard to be sure. Valid point. Expecting drivers to deal with reordered completions would be quite unintuitive, potentially laborious and bug-prone. > > > Note that some class drivers treat -EPROTO as a fatal error. That > > > is, they don't retry and their completion-resubmission loop breaks > > > down. > > > > Well, that's on EHCI. > > No, it's the behavior of the class driver and is independent of the > type of host controller. xHCI has been doing things differently for over a decade as far as I see, and it seems to implement the usb_unlink_urb() rules absolutely literally (restart when everything is given back), except for the BH delay problem added later. Maybe it was a common "idiom" before xHCI, but it seems to rely on undocumented behavior, and other undocumented behaviors exist today that sloppy drivers might depend on. So I don't know, it seems risky either way. Regards, Michal