Re: [PATCH] win: usb: use port_number instead of device_address

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

 



Hi,

On 03/07/2013 12:27 AM, Uri Lublin wrote:
It seems that device_address is not consistent and port_number is for Windows.
For example the device_address may change when the WinUSB driver is
installed.
This seems to happen more for Win7 clients.

USB devices are being redir'ed by their bus_number and device_address.
When the device_address before/after installing the WinUSB driver is not
the same, the "before" device will not be found, and an error message
will appear. The "after" device may or may not be redir'ed.

Note that win-usb-dev.h is compiled only for Windows machine.

Fixes rhbz#842816

I believe this needs more testing before it can be applied. the port-number
typically is the number of the hub port, so 2 devices, 1 in the first port of
the root-hub, and one in the 1st port of another hub could / should have the
same port-number.

Can you please get 2 external usb-hubs (preferable 2 identical ones) and then
check what the port-numbers are for a device plugged into the 1st port of each
hub?

Regards,

Hans


---

1. Although a bit hacky and maybe confusing, this patch is least intrusive,
and does not require ifdefs etc.
If you think it's too much, please let me know and I'll make another patch.
One thing I thought of is to redir based on vid:pid instead of bus.addr for windows clients.

2. I did not reproduced the bug exactly as explained in its description.

---
  gtk/win-usb-dev.h | 1 +
  1 file changed, 1 insertion(+)

diff --git a/gtk/win-usb-dev.h b/gtk/win-usb-dev.h
index b5c4fce..5cd6ef5 100644
--- a/gtk/win-usb-dev.h
+++ b/gtk/win-usb-dev.h
@@ -107,4 +107,5 @@ typedef enum

  G_END_DECLS

+#define libusb_get_device_address(dev) libusb_get_port_number(dev)
  #endif /* __WIN_USB_DEV_H__ */

_______________________________________________
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]