<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 3, 2017 at 10:16 AM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Mon, Jul 03, 2017 at 07:48:31AM +0300, Yuri Benditovich wrote:<br>
> <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1425961" rel="noreferrer" target="_blank">https://bugzilla.redhat.com/<wbr>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>
</span>There apparently were some issues in the past with bus/addr changing<br>
when it should not<br>
<a href="https://cgit.freedesktop.org/spice/spice-gtk/commit/?id=f9631cd6f8" rel="noreferrer" target="_blank">https://cgit.freedesktop.org/<wbr>spice/spice-gtk/commit/?id=<wbr>f9631cd6f8</a><br>
<br>
Any idea whether this is no longer needed?<br></blockquote><div><br></div><div>There is no additional information about case when the same device comes with different bus.addr</div><div>1. From my point of view this should not be a problem - if new device with different bus.addr comes in, the previous one with<br></div><div>old bus.addr should disappear and be removed anywhere ; new device shall be redirected automatically if required.</div><div>If such flow will be identified/reported with UsbDk, we will be able to investigate it and solve. </div><div>2. Whether the configuration with WinUSB is still used by spice-gtk on Windows? According to instructions<br></div><div>on <a href="https://www.spice-space.org/spice-user-manual.html">https://www.spice-space.org/spice-user-manual.html</a> , UsbDk should be used and WinUSB is not mentioned. </div><div><br></div><div>If we still need to support WinUSB (?) in backward compatible manner, we can add the condition and with</div><div>WinUSB just one drive with vid/pid combination will be recognized on plug-in.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Christophe<br>
<div><div class="gmail-h5"><br>
><br>
> Signed-off-by: Yuri Benditovich <<a href="mailto:yuri.benditovich@daynix.com">yuri.benditovich@daynix.com</a>><br>
> ---<br>
> src/win-usb-dev.c | 8 ++++----<br>
> 1 file changed, 4 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c<br>
> index ec3dd91..e5cd7c6 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>
> static gint gudev_devices_differ(<wbr>gconstpointer a, gconstpointer b)<br>
> {<br>
> GUdevDeviceInfo *ai, *bi;<br>
> - gboolean same_vid;<br>
> - gboolean same_pid;<br>
> + gboolean same_vid, same_pid, same_bus, same_addr;<br>
><br>
> ai = G_UDEV_DEVICE(a)->priv-><wbr>udevinfo;<br>
> bi = G_UDEV_DEVICE(b)->priv-><wbr>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_pid && same_vid && same_bus && same_addr) ? 0 : -1;<br>
> }<br>
><br>
> static void notify_dev_state_change(<wbr>GUdevClient *self,<br>
> --<br>
> 2.9.4<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> Spice-devel mailing list<br>
> <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.<wbr>org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/spice-devel</a><br>
</blockquote></div><br></div></div>