[PATCH 00/17] Initial implementation of a USB kernel driver

Brendan Shanks bshanks at codeweavers.com
Wed Apr 15 01:23:36 CDT 2020


> On Apr 14, 2020, at 8:28 PM, Zebediah Figura <z.figura12 at gmail.com> wrote:
> 
> Linux does not make USB devices writable by default, so users will need to set
> udev rules, or perform some other configuration, for devices which they wish to
> use through Wine.
> 
> The code supports hotplugging in theory, but I ran into a problem where udev
> rules race with libusb discovery, such that libusb will pick up a device before
> udev has granted us write permissions.  I'm not sure how to resolve this;
> possibly it's something that can be fixed on the host side.

I had this problem a few years ago when using hidapi (which uses libudev for discovery). The fix was to check udev_device_get_is_initialized(), and ignore the device until it returns true. Seems like this would have to be added to libusb though, or maybe even udev (should udev really send events for devices it hasn’t initialized?)

https://github.com/signal11/hidapi/issues/217
https://github.com/signal11/hidapi/pull/220

Brendan


More information about the wine-devel mailing list