On Tue, Mar 26, 2024 at 09:09:57AM +0100, Manuel Bouyer wrote: > On Tue, Mar 26, 2024 at 12:25:07AM +0000, Taylor R Campbell wrote: > > This is how it works in other systems like Linux with > > USBDEVFS_CLAIMINTERFACE, and that's the model that libusb is built > > around. It's a nontrivial change to our USB stack requiring some care > > to get right, but this is far and away the biggest shortcoming of our > > USB stack and we should unquestionably do it. > > Strongly seconded.
Yes! It is also not *that* intrusive as it may sound at first look: basically we need a central registry that collects all the identification data (vid,pid,strings and what have you) plus the parent and the device pointer, and a flag if this is a device claimed by some driver or one of the currently visible ugen* things. Due to this being USB we already have detach support everywhere, and only need a bit of additional glue. Martin