Hi, On 03/25/2013 11:01 AM, Uri Lublin wrote:
rhbz#842816 It seems that sometimes a USB device's bus.address is changing after installation of WinUSB driver for that device. So instead use vid:pid which are consistent across driver installation. The switch to using vid:pid is done in patch 8/9. Some code reuses variables named "bus" and "address" to hold vid and pid values. If people think this should be changed to new variables names (ifdefed) and/or new function instead of spice_usb_device_manager_get_udev_bus_n_address let me know. Using two devices with the same vid:pid on the same Windows client is already not supported, since Windows installs USB drivers for specific devices based on their vid:pid
Hmm, I'm not very happy with the approach you've chosen here. Just because usbclerck / our driver swapping magic currently does not support having devices with identical vid:pid is not a good reason to add the same problem to other parts of the code. The contrary is true really, this is something which we should try to fix, not make worse. Have you tried using libusb_get_port_path? I know that is sensitive to device swap races on the same port, so how about using a combination of libusb_get_port_path + vid & pid to identify a device? Regards, Hans _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel