On 2012.05.14 10:29, Hans de Goede wrote: > Hi, > > On 05/14/2012 12:41 AM, Pete Batard wrote: >> So, in summary, the issue is: >> - you have developed a custom solution/layer to add hotplug to libusbx, >> even as libusbx is going to officially implement the very same feature, >> internally, in a manner that is likely to be quite different from yours. > > Yes and no, yes we do hotplug, no we've not added hotplug to libusbx,
I addressed this point already. It doesn't matter if you modify libusbx or add an extra layer on top of it. The issue is you are replicating a feature that libusbx is planning to provide, and that, as far as I could see from my tests, unless somebody else provides the same feature as a layer, in the same fashion as you do, they will not encounter the issue. > In essence what happens from the libusbx pov is: > > 1) libusbx gets initialized > 2) libusb_get_device_list() gets called > 3) a new USB device gets plugged in > 4) that new device gets the winusb driver bound to it > 5) libusb_get_device_list() gets called again > > And after 5 we expect libusbx to both know about the device, and for the > app to be able to use the device through libusbx. This seems like a > reasonable thing to expect to me, even of a not hotplug aware libusbx. Which it does. As far as I know, I tested xusb in exactly the fashion highlighted above, and found no issue. I produced the result from the test I ran as well as the xusb patch I applied, and it matches your list. I was able to use the device as expected after the second libusb_get_device_list() was called. Are you sure you're issuing a libusb_free_device_list before issuing the second libusb_get_device_list? Right now, outside of not freeing the list (but in that case, expecting an enum list to auto-update itself if after it has been generated IS hotplug), the only way I see for your issue to manifest itself is if the driver installation ends when we're in the middle of enumeration on Windows, i.e. we ran an enum pass where the driver was seen as unsupported (no driver) and later passes see the driver as supported through WinUSB. But I can only see that happen if someone provides a custom hotplug implementation. Now, if you can modify xusb or produce a sample that demonstrates that your issue occurs in a non custom hotplug scenario, that's a different story. Regards, /Pete ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel