Re: [spice-gtk PATCH 0/9] Windows: identify USB devices by vid:pid instead of bus.address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]