On Tue, Aug 16, 2011 at 09:37:39AM +0200, Hans Petter Selasky wrote: > On Monday 15 August 2011 22:26:56 Juergen Lock wrote: > > Hi! > > > > I just prepared a preliminary update of the emulators/qemu-devel > > port to 0.15.0 [1], and among other things it now also has a > > usb network redirection feature using usbredir [2], which uses > > libusb 1.0 and a function that is missing in our version, > > libusb_get_device_speed(). I added a stub to the code that > > always returns LIBUSB_SPEED_UNKNOWN > > (files/patch-usbredirhost-usbredirhost.c in the usbredir port [2]), > > question for Hans (I guess), would there be an easy way to make a > > `proper' implementation? > > > > If anyone wants to help me test qemu 0.15.0, thanx! > > Please try the attached patch to libusb in /usr/src/lib/libusb . > > You only need to rebuild libusb: make all install clean > > > FETCHENTRY: entry at 22C5484 is of type 2 which is not supported > > yet processing error - resetting ehci HC > > Try my patch first. EHCI needs to know device speed.
Thanx, tho it turns out: a) the FETCHENTRY:.. crash also happens without any device redirection with FreeBSD 8.2 (at least) guests and ehci enabled (-readconfig docs/ich9-ehci-uhci.cfg), and b) if I test this with your patch (working libusb_get_device_speed() that doesn't just always return LIBUSB_SPEED_UNKNOWN) and redirecting an usb 2.0 device with ehci enabled using usbredir then qemu complains like: qemu: Warning: speed mismatch trying to attach usb device USB Redirectio n Device to bus usb.0 and ignores the redirected device. So for now I have added a #define IGNORE_LIBUSB_GET_DEVICE_SPEED to the (updated) preliminary usbredir FreeBSD port, http://people.freebsd.org/~nox/qemu/usbredir.shar so that usbredirhost_open() now always works with: device_connect.speed = usb_redir_speed_unknown; Question: do people also see this problem on Linux? This post has an usage example: http://thread.gmane.org/gmane.comp.emulators.qemu/110176/focus=110183 Or is the problem just that with the example usage, sudo usbredirserver 045e:0772 ... qemu ... \ -readconfig docs/ich9-ehci-uhci.cfg \ -chardev socket,id=usbredirchardev,host=localhost,port=4000 \ -device usb-redir,chardev=usbredirchardev,id=usbredirdev qemu 0.15.0 tries to attach the redirected usb 2.0 device to the uhci bus instead of to the ehci one and if yes, how can I fix that? Thanx! :) Juergen