<div dir="ltr">Hi all,<div>maybe I should post this message to [usbredir and qemu devel list] , </div><div>but I just didnt find it :)</div><div><br></div><div style>By default, spice-gtk filters out 'usb hubs' from redir list, and only show 'non-hub non-interface' usb devs.</div>
<div style><br></div><div style>But sometime, we want to just simply pass a usb-hub to guest , and dont care about whatever is plugged on it.</div><div style><br></div><div style>So, I tweaked spice-gtk a bit like this:</div>
<div style><br></div><div>static void spice_usb_device_manager_add_dev(SpiceUsbDeviceManager *self,</div><div> GUdevDevice *udev)</div><div>{</div><div>...</div><div>
/* Skip hubs */</div><div> devclass = g_udev_device_get_sysfs_attr(udev, "bDeviceClass");</div><div> if (!devclass || !strcmp(devclass, "09"))</div><div> {</div><div>- return;</div><div>
+ printf(" Yes, it's a hub, and we want it :) \n "); </div><div>...</div><div style> } </div><div style><br></div><div style>Then, something interesting happened after I redired a usb-hub with a usb-disk plugged on it.</div>
<div style>1. The hub is successfully redired into guest.</div><div style> I can see it in 'Window Device Manager' , it is correctly recognized as 'usb hub' with right usb transfer speed (in my case , 480M).</div>
<div style><br></div><div style>2. The usb-disk is also detected by windows, and addressed under the hub.</div><div style> But we are not lucky enough to see it as 'usb mass storage', but as 'unknown device'.</div>
<div style><br></div><div style>3. If I redir the usb-disk rather than the hub, that's OK.</div><div style><br></div><div style>my env:</div><div style>qemu 1.3.1 ( kvm is enabled )</div><div style>libusb 1.0.9</div><div style>
libusbredir 0.6</div><div style>spice-gtk 0.19<br></div><div style>spice 0.12.3</div><div style><br></div><div style>So my question is , can we directly redir usb hub to guest?</div><div style>If not, what hinder us to accomplish this?</div>
<div style>Maybe I can modify qemu/libusb/... to enable this , </div><div style>but now I need your hint and idea :)</div><div style><br></div><div style>Thanks in advance.</div><div style><br></div><div style><br></div><div style>
<br></div><div style><br></div></div>