<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 12, 2017 at 10:02 AM Uri Lublin <<a href="mailto:uril@redhat.com">uril@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Yuri,<br>
<br>
I'd mention in the Subject/Log that a device is now identified<br>
by its bus.addr instead of vid:pid.<br>
<br>
On 07/05/2017 08:21 AM, Yuri Benditovich wrote:<br>
> <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1425961" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1425961</a><br>
> If attached new device when one device with the same vid<br>
> and pid already present, the notification is ignored and<br>
> attached device is not redirected (if auto share set) and<br>
> not displayed in USB devices widget.<br>
><br>
> This commit reverts older commit f9631cd6f8, which was<br>
> intended to solve problem when bus:addr is sometimes changed when<br>
> using WinUSB. The same commit creates the limitation for automatic<br>
> redirection of second device with the same pid:vid.<br>
> Now the preferred backend for Spice-GTK on Windows is UsbDk.<br>
> In case users of newer WinUSB will still need backward compatible<br>
> behavior, consider backend-aware comparison procedure.<br>
><br>
> Signed-off-by: Yuri Benditovich <<a href="mailto:yuri.benditovich@daynix.com" target="_blank">yuri.benditovich@daynix.com</a>><br>
<br>
Acked-by: Uri Lublin <<a href="mailto:uril@redhat.com" target="_blank">uril@redhat.com</a>><br>
<br></blockquote><div><br></div><div>pushed with commit comment addition:<br><br>commit de41d93285461264d7d1c14a1e649433d3911da6<br>Author: Yuri Benditovich <<a href="mailto:yuri.benditovich@daynix.com">yuri.benditovich@daynix.com</a>><br>Date:   Wed Jul 5 08:21:46 2017 +0300<br><br>    win-usb-dev: fix device arrival event logic<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
     Uri.<br>
<br>
> ---<br>
>   src/win-usb-dev.c | 12 ++++++------<br>
>   1 file changed, 6 insertions(+), 6 deletions(-)<br>
><br>
> diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c<br>
> index ec3dd91..e2d77b3 100644<br>
> --- a/src/win-usb-dev.c<br>
> +++ b/src/win-usb-dev.c<br>
> @@ -380,20 +380,20 @@ static gboolean get_usb_dev_info(libusb_device *dev, GUdevDeviceInfo *udevinfo)<br>
>       return TRUE;<br>
>   }<br>
><br>
> -/* Only vid:pid are compared */<br>
> +/* Only bus:addr are compared */<br>
>   static gint gudev_devices_differ(gconstpointer a, gconstpointer b)<br>
>   {<br>
>       GUdevDeviceInfo *ai, *bi;<br>
> -    gboolean same_vid;<br>
> -    gboolean same_pid;<br>
> +    gboolean same_bus;<br>
> +    gboolean same_addr;<br>
><br>
>       ai = G_UDEV_DEVICE(a)->priv->udevinfo;<br>
>       bi = G_UDEV_DEVICE(b)->priv->udevinfo;<br>
><br>
> -    same_vid  = (ai->vid == bi->vid);<br>
> -    same_pid  = (ai->pid == bi->pid);<br>
> +    same_bus = (ai->bus == bi->bus);<br>
> +    same_addr = (ai->addr == bi->addr);<br>
><br>
> -    return (same_pid && same_vid) ? 0 : -1;<br>
> +    return (same_bus && same_addr) ? 0 : -1;<br>
>   }<br>
><br>
>   static void notify_dev_state_change(GUdevClient *self,<br>
><br>
<br>
_______________________________________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org" target="_blank">Spice-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
</blockquote></div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Marc-André Lureau<br></div></div>