usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller
PATCH 1/1 usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller
From: Jan Kiszka <[email protected]>
This follows the logic of host-linux: If a 2.0 device has no ISO endpoint and no interrupt endpoint with a packet size > 64, we can attach it also to an 1.1 host controller. In case the redir server does not report endpoint sizes, play safe and remove the 1.1 compatibility as well.
--- hw/usb/redirect.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
hw/usb/redirect.c +10 -0
@@ -1098,6 +1098,9 @@ static void usbredir_device_connect(void *priv, } dev->dev.speedmask = (1 << dev->dev.speed); +if (dev->dev.speed ==USB_SPEED_HIGH ) { + dev->dev.speedmask |=USB_SPEED_MASK_FULL ; + } dev->device_info = *device_connect;if (usbredir_check_filter (dev)) {
@@ -1172,7 +1175,14 @@ static void usbredir_ep_info(void *priv,case usb_redir_type_invalid:break ;case usb_redir_type_iso: + dev->dev.speedmask &= ~USB_SPEED_MASK_FULL ; +/* Fall through */ case usb_redir_type_interrupt: +if (!usbredirparser_peer_has_cap (dev->parser, + usb_redir_cap_ep_info_max_packet_size) || + ep_info->max_packet_size[i] >64 ) { + dev->dev.speedmask &= ~USB_SPEED_MASK_FULL ; + }if (dev->endpoint[i].interval ==0 ) {ERROR ("Received 0 interval for isoc or irq endpoint\n" );usbredir_device_disconnect (dev);
Signature · 1 line
1.7.3.4
Hi,
Quoted 9 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
This follows the logic of host-linux: If a 2.0 device has no ISO endpoint and no interrupt endpoint with a packet size > 64, we can attach it also to an 1.1 host controller. In case the redir server does not report endpoint sizes, play safe and remove the 1.1 compatibility as well.
Signed-off-by Jan Kiszka <[email protected]>
Interesting thanks for the patch. I like the approach you took (simple code), but unfortunately it won't work, if you look at usbredir_device_connect(), where you do the dev->dev.speedmask |= USB_SPEED_MASK_FULL, it also actually attaches the device to the controller, from which point on the guest will see the device.
What happens on the wire is that the usbredir-host sends (in order):
-ep_info + interface_info
-device_connect message
So your clearing of the speed-mask will never trigger, unless ep-info gets repeated later (which it does under certain circumstances).
I suggest instead changing the code to set a "fullspeed_compatible" flag in struct USBRedirDevice from usbredir_device_disconnect(), clear that flag from usbredir_ep_info and use it to add to the mask in usbredir_device_connect().
###
Another issue is what happens if a device "grows" incompatible endpoints after being attached, ie a webcam could have no isoc endpoints in alt setting 0, and then grow an isoc endpoint on a set_interface. So we would need a check for a device becoming not fullspeed compat while being attached at fullspeed in usbredir_ep_info(), and then call usbredir_reject_device() when this happens.
Although not pretty I'm ok with this, since I actually want to add similar code to allow usb-3 (superspeed) devices like a usb-3 usb-stick to work with ehci or uhci controllers :)
Regards,
Hans
Quoted 34 lines
--- hw/usb/redirect.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)hw/usb/redirect.c +10
-0@@ -1098,6 +1098,9 @@ static void usbredir_device_connect(void *priv, } dev->dev.speedmask = (1 << dev->dev.speed); +if (dev->dev.speed ==USB_SPEED_HIGH ) { + dev->dev.speedmask |=USB_SPEED_MASK_FULL ; + } dev->device_info = *device_connect;if (usbredir_check_filter (dev)) {@@ -1172,7 +1175,14 @@ static void usbredir_ep_info(void *priv,case usb_redir_type_invalid:break ;case usb_redir_type_iso: + dev->dev.speedmask &= ~USB_SPEED_MASK_FULL ; +/* Fall through */ case usb_redir_type_interrupt: +if (!usbredirparser_peer_has_cap (dev->parser, + usb_redir_cap_ep_info_max_packet_size) || + ep_info->max_packet_size[i] >64 ) { + dev->dev.speedmask &= ~USB_SPEED_MASK_FULL ; + }if (dev->endpoint[i].interval ==0 ) {ERROR ("Received 0 interval for isoc or irq endpoint\n" );usbredir_device_disconnect (dev);
Quoted 24 lines · Hans de Goede
Hi,
Quoted 9 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
This follows the logic of host-linux: If a 2.0 device has no ISO endpoint and no interrupt endpoint with a packet size > 64, we can attach it also to an 1.1 host controller. In case the redir server does not report endpoint sizes, play safe and remove the 1.1 compatibility as well.
Signed-off-by Jan Kiszka <[email protected]>Interesting thanks for the patch. I like the approach you took (simple code),
but unfortunately it won't work, if you look atusbredir_device_connect(), where you do thedev->dev.speedmask|=USB_SPEED_MASK_FULL, it also actually attaches the device to the controller, from which point on the guest will see the device.What happens on the wire is that the usbredir-host sends (in order):
(quoted diff) +0
-2-ep_info + interface_info -device_connect message
Quoted 2 lines
So your clearing of the speed-mask will never trigger, unless ep-info gets repeated later (which it does under certain circumstances).
Hmm, what a pity...
Quoted 5 lines
I suggest instead changing the code to set a "
fullspeed_compatible" flag in struct USBRedirDevice fromusbredir_device_disconnect(), clear that flag fromusbredir_ep_infoand use it to add to the mask inusbredir_device_connect().
OK.
Quoted 9 lines
###
Another issue is what happens if a device "grows" incompatible endpoints after being attached, ie a webcam could have no isoc endpoints in alt setting 0, and then grow an isoc endpoint on a
set_interface. So we would need a check for a device becoming not fullspeed compat while being attached at fullspeed inusbredir_ep_info(), and then callusbredir_reject_device()when this happens.
...and this patch started so simple. OK.
Quoted 4 lines
Although not pretty I'm ok with this, since I actually want to add similar code to allow usb-3 (superspeed) devices like a usb-3 usb-stick to work with ehci or uhci controllers :)
Great, that would have been my next question, but I don't have hardware for that around yet.
BTW, I'm facing several incompatibilities with passed-through CDC/ACM devices (e.g. a Galaxy S2), independent of my patch. Both host-linux and redir doesn't allow to use them properly but show different symptoms. Need to analyze and report once time permits.
Jan
Hi,
Quoted 1 line · Jan Kiszka
On 2012-09-17 11:08, Hans de Goede wrote:
<snip>
Quoted 6 lines
Quoted 3 lines
Although not pretty I'm ok with this, since I actually want to add similar code to allow usb-3 (superspeed) devices like a usb-3 usb-stick to work with ehci or uhci controllers :)
Great, that would have been my next question, but I don't have hardware for that around yet.
I do have hardware for that around, so once you've respun your patch to address the issues discussed, then that will give me a nice basis to add usb-3 usb-stick to ehci-controller redirection :)
Quoted 4 lines
BTW, I'm facing several incompatibilities with passed-through CDC/ACM devices (e.g. a Galaxy S2), independent of my patch. Both host-linux and redir doesn't allow to use them properly but show different symptoms. Need to analyze and report once time permits.
Hmm, there is (was) one know issues with these devices, which has been fixed in usbredir, so first of all make sure that the usbredir on your spice-client / usbredirserver, has this patch:
http://cgit.freedesktop.org/spice/usbredir/commit/?id=7783d3db61083bbf7f61b1ea8608c666b4c6a1dd
If that does not work, add the debug parameter to the usb-redir device, set it to 4, collect logs of trying to redirect the device and send me the logs please, ie:
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=4
Also be aware that usb-redir relies on chardev flowcontrol working, which it does not upstream! See for example here for the chardev flow control patch set which RHEL / Fedora carry:
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.2-usbredir&ofs=50
And then the first 13 patches after: "Merge tag 'v1.2.0'"
Oh, and also, if you're running qemu git master, make sure you've:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?id=81e34f5973d8d6a1ef998a50c4a4bf66abb3b56b
Regards,
Hans
Quoted 23 lines · Hans de Goede
Hi,
Quoted 1 line · Jan Kiszka
On 2012-09-17 11:08, Hans de Goede wrote:
<snip>
Quoted 6 lines
Quoted 3 lines
Although not pretty I'm ok with this, since I actually want to add similar code to allow usb-3 (superspeed) devices like a usb-3 usb-stick to work with ehci or uhci controllers :)
Great, that would have been my next question, but I don't have hardware for that around yet.
I do have hardware for that around, so once you've respun your patch to address the issues discussed, then that will give me a nice basis to add usb-3 usb-stick to ehci-controller redirection :)
Quoted 4 lines
BTW, I'm facing several incompatibilities with passed-through CDC/ACM devices (e.g. a Galaxy S2), independent of my patch. Both host-linux and redir doesn't allow to use them properly but show different symptoms. Need to analyze and report once time permits.
Quoted 7 lines
Hmm, there is (was) one know issues with these devices, which has been fixed
in usbredir, so first of all make sure that the usbredir on your spice-client
/ usbredirserver, has this patch:
http://cgit.freedesktop.org/spice/usbredir/commit/?id=7783d3db61083bbf7f61b1ea8608c666b4c6a1dd
Included (I'm using 0.5 or even git head).
Quoted 13 lines
If that does not work, add the debug parameter to the usb-redir device, set it
to 4, collect logs of trying to redirect the device and send me the logs please, ie:
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=4Also be aware that usb-redir relies on chardev flowcontrol working, which it does not upstream! See for example here for the chardev flow control patch set which RHEL / Fedora carry:
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.2-usbredir&ofs=50
Quoted 5 lines
And then the first 13 patches after: "Merge tag 'v1.2.0'"
Oh, and also, if you're running qemu git master, make sure you've:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?id=81e34f5973d8d6a1ef998a50c4a4bf66abb3b56b
I used qemu-kvm-1.2-usbredir^ (the last commit is apparently broken - copy&paste bug?). I'm getting this right after typing cat /dev/ACM0 in the guest. It's an endless stream, and so is the output in the guest although there should be nothing to dump (that's the proper behaviour on the host).
qemu-system-x86_64: usb-redir: ctrl-out type 0x21 req 0x22 val 0x3 index 1 len 0 id 933360000
qemu-system-x86_64: usb-redir: ctrl-in status 0 len 0 id 933360000
qemu-system-x86_64: usb-redir: interrupt recv started ep 83
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933359872
qemu-system-x86_64: usb-redir: interrupt recv status 0 ep 83 id 0
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 9 id 933359872
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360192
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933360192
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360320
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362176
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362560
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362624
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362688
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362176
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362560
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362624
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362688
qemu-system-x86_64: usb-redir: interrupt-in status 0 ep 83 len 10 id 0
qemu-system-x86_64: usb-redir: interrupt-token-in ep 83 status 0 len 10
qemu-system-x86_64: usb-redir: interrupt-in status 0 ep 83 len 10 id 1
qemu-system-x86_64: usb-redir: interrupt-token-in ep 83 status 0 len 10
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 13 id 933360320
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360448
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933360448
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362752
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362624
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362560
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362240
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362176
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362816
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362880
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362944
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362752
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360576
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362624
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362560
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362240
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362176
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362816
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362880
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362944
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 21 id 933360576
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360704
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933360704
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360832
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363072
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362944
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362880
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362816
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362176
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362560
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362624
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362752
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363136
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363072
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362944
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362880
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362816
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362176
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362560
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362624
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362752
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363136
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 27 id 933360832
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360960
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933360960
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933361088
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363264
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362624
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362560
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360896
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362176
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362816
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362880
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362944
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363264
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362624
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362560
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360896
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362176
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362816
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362880
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362944
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 32 id 933361088
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933361216
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933361216
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933361344
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363072
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362816
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362176
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933361152
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933360960
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360896
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362560
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362624
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363072
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362816
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362176
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933361152
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933360960
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360896
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362560
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362624
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 27 id 933361344
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933361472
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933361472
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933361600
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363264
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360896
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361408
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361216
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362176
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362816
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363264
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360896
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361408
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361216
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362176
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362816
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 26 id 933361600
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933361728
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933361728
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933361856
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 6 id 933361856
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933361984
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933361984
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933362112
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363072
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933360704
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933361216
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 1 id 933361408
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360896
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363072
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933360704
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933361216
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 1 id 933361408
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360896
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 27 id 933362112
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360000
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933360000
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933359872
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363264
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361216
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933359808
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361984
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363264
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361216
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933359808
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361984
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362240
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 32 id 933359872
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360192
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933360192
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360320
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363072
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360000
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361984
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933359808
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361216
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363072
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360000
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361984
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933359808
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361216
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 32 id 933360320
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360448
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933360448
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360576
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363264
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361984
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360000
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363072
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360640
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363264
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361984
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360000
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363008
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363072
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360640
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 32 id 933360576
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933362752
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933362752
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933360832
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360192
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360640
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363136
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360448
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360000
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361984
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360192
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360640
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363136
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360448
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360000
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360704
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361984
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 32 id 933360832
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933362880
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933362880
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933361088
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363264
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362944
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362752
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360000
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360448
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363136
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360640
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363264
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363200
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362944
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362752
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360000
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360448
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933363136
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 04 len 2 id 933360640
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 32 id 933361088
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933362560
qemu-system-x86_64: usb-redir: bulk-in status 0 ep 85 len 0 id 933362560
qemu-system-x86_64: usb-redir: bulk-out ep 85 len 512 id 933361344
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360192
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360640
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362624
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362880
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360000
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361664
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361472
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362304
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933361152
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933360960
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362368
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362752
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362944
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362432
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933362496
qemu-system-x86_64: usb-redir: bulk-out ep 04 len 2 id 933363200
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux
Hi,
Quoted 12 lines · Jan Kiszka
Quoted 12 lines
If that does not work, add the debug parameter to the usb-redir device, set it
to 4, collect logs of trying to redirect the device and send me the logs please, ie:
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=4Also be aware that usb-redir relies on chardev flowcontrol working, which it does not upstream! See for example here for the chardev flow control patch set which RHEL / Fedora carry:
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.2-usbredir&ofs=50
Quoted 8 lines
Quoted 5 lines
And then the first 13 patches after: "Merge tag 'v1.2.0'"
Oh, and also, if you're running qemu git master, make sure you've:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?id=81e34f5973d8d6a1ef998a50c4a4bf66abb3b56bI used qemu-kvm-1.2-usbredir^ (the last commit is apparently broken - copy&paste bug?).
Yeah, that has been fixed now.
Quoted 4 lines
I'm getting this right after typing cat
/dev/ACM0in
the guest. It's an endless stream, and so is the output in the guest although there should be nothing to dump (that's the proper behaviour on the host).
Hmm, can you try commenting out line 1608 of hw/usb/redirect.c:
usb_ep->pipeline = true;
And see if that helps. If it does not help, please bump the debug level to 5 (this will also make it log packet contents), and then generate another log, and then it is time to dive into the ACM protocol to see what is happening...
Regards,
Hans
Quoted 33 lines · Hans de Goede
Hi,
Quoted 1 line · Jan Kiszka
On 2012-09-17 11:08, Hans de Goede wrote:
<snip>
Quoted 6 lines
Quoted 3 lines
Although not pretty I'm ok with this, since I actually want to add similar code to allow usb-3 (superspeed) devices like a usb-3 usb-stick to work with ehci or uhci controllers :)
Great, that would have been my next question, but I don't have hardware for that around yet.
I do have hardware for that around, so once you've respun your patch to address the issues discussed, then that will give me a nice basis to add usb-3 usb-stick to ehci-controller redirection :)
Quoted 4 lines
BTW, I'm facing several incompatibilities with passed-through CDC/ACM devices (e.g. a Galaxy S2), independent of my patch. Both host-linux and redir doesn't allow to use them properly but show different symptoms. Need to analyze and report once time permits.
Hmm, there is (was) one know issues with these devices, which has been fixed in usbredir, so first of all make sure that the usbredir on your spice-client / usbredirserver, has this patch:
http://cgit.freedesktop.org/spice/usbredir/commit/?id=7783d3db61083bbf7f61b1ea8608c666b4c6a1ddIf that does not work, add the debug parameter to the usb-redir device, set it to 4, collect logs of trying to redirect the device and send me the logs please, ie:
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=4
Quoted 4 lines
Also be aware that usb-redir relies on chardev flowcontrol working, which it does not upstream! See for example here for the chardev flow control patch set which RHEL / Fedora carry:
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.2-usbredir&ofs=50
Those patches are garbage.
Are you saying that usb-redir doesn't work in qemu.git? So why are we even carrying it?
Regards,
Anthony Liguori
Quoted 9 lines
And then the first 13 patches after: "Merge tag 'v1.2.0'"
Oh, and also, if you're running qemu git master, make sure you've:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?id=81e34f5973d8d6a1ef998a50c4a4bf66abb3b56bRegards,
Hans
Hi,
Quoted 35 lines · Anthony Liguori
Quoted 33 lines · Hans de Goede
Hi,
Quoted 1 line · Jan Kiszka
On 2012-09-17 11:08, Hans de Goede wrote:
<snip>
Quoted 6 lines
Quoted 3 lines
Although not pretty I'm ok with this, since I actually want to add similar code to allow usb-3 (superspeed) devices like a usb-3 usb-stick to work with ehci or uhci controllers :)
Great, that would have been my next question, but I don't have hardware for that around yet.
I do have hardware for that around, so once you've respun your patch to address the issues discussed, then that will give me a nice basis to add usb-3 usb-stick to ehci-controller redirection :)
Quoted 4 lines
BTW, I'm facing several incompatibilities with passed-through CDC/ACM devices (e.g. a Galaxy S2), independent of my patch. Both host-linux and redir doesn't allow to use them properly but show different symptoms. Need to analyze and report once time permits.
Hmm, there is (was) one know issues with these devices, which has been fixed in usbredir, so first of all make sure that the usbredir on your spice-client / usbredirserver, has this patch:
http://cgit.freedesktop.org/spice/usbredir/commit/?id=7783d3db61083bbf7f61b1ea8608c666b4c6a1ddIf that does not work, add the debug parameter to the usb-redir device, set it to 4, collect logs of trying to redirect the device and send me the logs please, ie:
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=4
Quoted 6 lines
Quoted 4 lines
Also be aware that usb-redir relies on chardev flowcontrol working, which it does not upstream! See for example here for the chardev flow control patch set which RHEL / Fedora carry:
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.2-usbredir&ofs=50Those patches are garbage.
<sigh, very very deep sigh>
No they are not garbage. They:
1) Fix a real issue, which is independent of spice / usb-redir but happens to be more easily triggerable with them. Note that the original set was developed to fix a bug which did not involve either!
2) Are disliked by you because they build upon the existing not pretty chardev code. We all agree that needs a rewrite. But that is not a valid reason to keep this perfectly fine patchset out of qemu master for years now!
3) You keep saying they are "racy", but you've never given a simple step by step thread 1 does foo, thread 2 does bar replay of such a theoretical race.
4) Have caused no issues in almost 2 years of deployment in the field in both RHEL and Fedora.
5) Are kept out of master by you for no valid reasons, you seem to use them as a tool to strongarm people into rewriting the qemu chardev layer. Well it seems that no one is biting because of -ENOTIME, so can we now please get these included, after almost 2 years since their first posting ?
Quoted 2 lines
Are you saying that usb-redir doesn't work in qemu.git? So why are we even carrying it?
It works just as well as virtio-console or any other chardev frontend, any chardev frontent can currently trigger asserts by writing data faster then the backend can handle. This is just more easily triggerable with USB trafic then with a serial console.
The original bug-report this patch set once was written for was about virtio-console and is dated 2010-08-05 !
So why are we even carrying virtio-console ?
Regards,
Hans
p.s.
Note that I'm *not* the original author of these patches.
Quoted 31 lines · Hans de Goede
Hi,
Quoted 12 lines · Jan Kiszka
Quoted 12 lines
If that does not work, add the debug parameter to the usb-redir device, set it
to 4, collect logs of trying to redirect the device and send me the logs please, ie:
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=4Also be aware that usb-redir relies on chardev flowcontrol working, which it does not upstream! See for example here for the chardev flow control patch set which RHEL / Fedora carry:
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.2-usbredir&ofs=50Quoted 8 lines
Quoted 5 lines
And then the first 13 patches after: "Merge tag 'v1.2.0'"
Oh, and also, if you're running qemu git master, make sure you've:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?id=81e34f5973d8d6a1ef998a50c4a4bf66abb3b56bI used qemu-kvm-1.2-usbredir^ (the last commit is apparently broken - copy&paste bug?).
Yeah, that has been fixed now.
Quoted 4 lines
I'm getting this right after typing cat
/dev/ACM0in
the guest. It's an endless stream, and so is the output in the guest although there should be nothing to dump (that's the proper behaviour on the host).
Quoted 6 lines
Hmm, can you try commenting out line 1608 of
hw/usb/redirect.c:usb_ep->pipeline = true;And see if that helps. If it does not help, please bump the debug level to 5 (this will also make it log packet contents), and then generate another log, and then it is time to dive into the ACM protocol to see what is happening...
As it looks like now, I was just using the wrong test on the guest side. Retried this morning briefly with a terminal program, and it was all fine, even when forwarding from host-ehci to guest-uhci (with my broken patch), even when using current QEMU git head. Sorry for the noise
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux
Hi,
Quoted 35 lines · Jan Kiszka
Quoted 34 lines · Hans de Goede
Hi,
Quoted 12 lines · Jan Kiszka
Quoted 12 lines
If that does not work, add the debug parameter to the usb-redir device, set it
to 4, collect logs of trying to redirect the device and send me the logs please, ie:
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=4Also be aware that usb-redir relies on chardev flowcontrol working, which it does not upstream! See for example here for the chardev flow control patch set which RHEL / Fedora carry:
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.2-usbredir&ofs=50Quoted 8 lines
Quoted 5 lines
And then the first 13 patches after: "Merge tag 'v1.2.0'"
Oh, and also, if you're running qemu git master, make sure you've:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?id=81e34f5973d8d6a1ef998a50c4a4bf66abb3b56bI used qemu-kvm-1.2-usbredir^ (the last commit is apparently broken - copy&paste bug?).
Yeah, that has been fixed now.
Quoted 4 lines
I'm getting this right after typing cat
/dev/ACM0in
the guest. It's an endless stream, and so is the output in the guest although there should be nothing to dump (that's the proper behaviour on the host).Hmm, can you try commenting out line 1608 of
hw/usb/redirect.c:usb_ep->pipeline = true;
Quoted 8 lines
Quoted 3 lines
And see if that helps. If it does not help, please bump the debug level to 5 (this will also make it log packet contents), and then generate another log, and then it is time to dive into the ACM protocol to see what is happening...
As it looks like now, I was just using the wrong test on the guest side. Retried this morning briefly with a terminal program, and it was all fine, even when forwarding from host-ehci to guest-uhci (with my broken patch), even when using current QEMU git head. Sorry for the noise
Ok, so to be clear: this is solved now, right ?
Regards,
Hans
Quoted 42 lines · Hans de Goede
Hi,
Quoted 39 lines · Jan Kiszka
Quoted 37 lines · Hans de Goede
Hi,
Quoted 12 lines · Jan Kiszka
Quoted 12 lines
If that does not work, add the debug parameter to the usb-redir device, set it
to 4, collect logs of trying to redirect the device and send me the logs please, ie:
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=4Also be aware that usb-redir relies on chardev flowcontrol working, which it does not upstream! See for example here for the chardev flow control patch set which RHEL / Fedora carry:
http://cgit.freedesktop.org/~jwrdegoede/qemu/log/?h=qemu-kvm-1.2-usbredir&ofs=50Quoted 8 lines
Quoted 5 lines
And then the first 13 patches after: "Merge tag 'v1.2.0'"
Oh, and also, if you're running qemu git master, make sure you've:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?id=81e34f5973d8d6a1ef998a50c4a4bf66abb3b56bI used qemu-kvm-1.2-usbredir^ (the last commit is apparently broken - copy&paste bug?).
Yeah, that has been fixed now.
Quoted 4 lines
I'm getting this right after typing cat
/dev/ACM0in
the guest. It's an endless stream, and so is the output in the guest although there should be nothing to dump (that's the proper behaviour on the host).Hmm, can you try commenting out line 1608 of
hw/usb/redirect.c:usb_ep->pipeline = true;And see if that helps. If it does not help, please bump the debug level to 5 (this will also make it log packet contents), and then generate another log, and then it is time to dive into the ACM protocol to see what is happening...
Quoted 6 lines
Quoted 4 lines
As it looks like now, I was just using the wrong test on the guest side. Retried this morning briefly with a terminal program, and it was all fine, even when forwarding from host-ehci to guest-uhci (with my broken patch), even when using current QEMU git head. Sorry for the noise
Ok, so to be clear: this is solved now, right ?
Let's consider it solved until I find a real bug. ;)
Will send some update for the speed matching patch on the weekend, probably.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux
PATCH v2 1/1 usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller
In reply to Hans de GoedeFrom: Jan Kiszka <[email protected]>
This follows the logic of host-linux: If a 2.0 device has no ISO endpoint and no interrupt endpoint with a packet size > 64, we can attach it also to an 1.1 host controller. In case the redir server does not report endpoint sizes, play safe and remove the 1.1 compatibility as well. Moreover, if we detect a conflicting change in the configuration after the device was already attached, it will be disconnected immediately.
---
Changes in v2:
- fix incompatibility marking via introduction of compatible_speedmask
- disconnect device if incompatibility is detected when already attached
hw/usb/redirect.c | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-)
hw/usb/redirect.c +23 -1
@@ -105,6 +105,7 @@ struct USBRedirDevice {struct usb_redir_interface_info_header interface_info;struct usbredirfilter_rule *filter_rules;int filter_rules_count; +int compatible_speedmask; };static void usbredir_hello (void *priv,struct usb_redir_hello_header *h);
@@ -1037,6 +1038,9 @@ static int usbredir_initfn(USBDevice *udev)/* We'll do the attach once we receive the speed from the usb-host */ udev->auto_attach =0 ; +/* Will be cleared during setup when we find conflicts */ + dev->compatible_speedmask =USB_SPEED_MASK_FULL ; +/* Let the backend know we are ready */ qemu_chr_fe_open (dev->cs); qemu_chr_add_handlers(dev->cs, usbredir_chardev_can_read,
@@ -1177,10 +1181,12 @@ static void usbredir_device_connect(void *priv,case usb_redir_speed_low: speed ="low speed" ; dev->dev.speed =USB_SPEED_LOW ; + dev->dev.speedmask =0 ;break ;case usb_redir_speed_full: speed ="full speed" ; dev->dev.speed =USB_SPEED_FULL ; + dev->dev.speedmask =0 ;break ;case usb_redir_speed_high: speed ="high speed" ;
@@ -1189,6 +1195,7 @@ static void usbredir_device_connect(void *priv,case usb_redir_speed_super: speed ="super speed" ; dev->dev.speed =USB_SPEED_SUPER ; + dev->dev.speedmask =0 ;break ;default : speed ="unknown speed" ;
@@ -1210,7 +1217,7 @@ static void usbredir_device_connect(void *priv, device_connect->device_class); } - dev->dev.speedmask = (1 << dev->dev.speed); + dev->dev.speedmask = (1 << dev->dev.speed) | dev->compatible_speedmask; dev->device_info = *device_connect;if (usbredir_check_filter (dev)) {
@@ -1271,6 +1278,14 @@ static void usbredir_interface_info(void *priv, } } +static void usbredir_mark_fullspeed_incompatible (USBRedirDevice *dev) +{ + dev->compatible_speedmask &= ~USB_SPEED_MASK_FULL ; +if (dev->dev.attached && dev->dev.port->dev->speed ==USB_SPEED_FULL ) { +usbredir_device_disconnect (dev); + } +} +static void usbredir_ep_info (void *priv,struct usb_redir_ep_info_header *ep_info) {
@@ -1286,7 +1301,14 @@ static void usbredir_ep_info(void *priv,case usb_redir_type_invalid:break ;case usb_redir_type_iso: +usbredir_mark_fullspeed_incompatible (dev); +/* Fall through */ case usb_redir_type_interrupt: +if (!usbredirparser_peer_has_cap (dev->parser, + usb_redir_cap_ep_info_max_packet_size) || + ep_info->max_packet_size[i] >64 ) { +usbredir_mark_fullspeed_incompatible (dev); + }if (dev->endpoint[i].interval ==0 ) {ERROR ("Received 0 interval for isoc or irq endpoint\n" );usbredir_device_disconnect (dev);
Signature · 1 line
1.7.3.4
Quoted 94 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
This follows the logic of host-linux: If a 2.0 device has no ISO endpoint and no interrupt endpoint with a packet size > 64, we can attach it also to an 1.1 host controller. In case the redir server does not report endpoint sizes, play safe and remove the 1.1 compatibility as well. Moreover, if we detect a conflicting change in the configuration after the device was already attached, it will be disconnected immediately.
Signed-off-by Jan Kiszka <[email protected]>---
Changes in v2:
- fix incompatibility marking via introduction ofcompatible_speedmask
- disconnect device if incompatibility is detected when already attachedhw/usb/redirect.c | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-)hw/usb/redirect.c +17
-1@@ -105,6 +105,7 @@ struct USBRedirDevice {struct usb_redir_interface_info_header interface_info;struct usbredirfilter_rule *filter_rules;int filter_rules_count; +int compatible_speedmask; };static void usbredir_hello (void *priv,struct usb_redir_hello_header *h);@@ -1037,6 +1038,9 @@ static int usbredir_initfn(USBDevice *udev)/* We'll do the attach once we receive the speed from the usb-host */ udev->auto_attach =0 ; +/* Will be cleared during setup when we find conflicts */ + dev->compatible_speedmask =USB_SPEED_MASK_FULL ; +/* Let the backend know we are ready */ qemu_chr_fe_open (dev->cs); qemu_chr_add_handlers(dev->cs, usbredir_chardev_can_read,@@ -1177,10 +1181,12 @@ static void usbredir_device_connect(void *priv,case usb_redir_speed_low: speed ="low speed" ; dev->dev.speed =USB_SPEED_LOW ; + dev->dev.speedmask =0 ;break ;case usb_redir_speed_full: speed ="full speed" ; dev->dev.speed =USB_SPEED_FULL ; + dev->dev.speedmask =0 ;break ;case usb_redir_speed_high: speed ="high speed" ;@@ -1189,6 +1195,7 @@ static void usbredir_device_connect(void *priv,case usb_redir_speed_super: speed ="super speed" ; dev->dev.speed =USB_SPEED_SUPER ; + dev->dev.speedmask =0 ;break ;default : speed ="unknown speed" ;@@ -1210,7 +1217,7 @@ static void usbredir_device_connect(void *priv, device_connect->device_class); } - dev->dev.speedmask = (1 << dev->dev.speed); + dev->dev.speedmask = (1 << dev->dev.speed) | dev->compatible_speedmask; dev->device_info = *device_connect;if (usbredir_check_filter (dev)) {@@ -1271,6 +1278,14 @@ static void usbredir_interface_info(void *priv, } } +static void usbredir_mark_fullspeed_incompatible (USBRedirDevice *dev) +{ + dev->compatible_speedmask &= ~USB_SPEED_MASK_FULL ; +if (dev->dev.attached && dev->dev.port->dev->speed ==USB_SPEED_FULL ) { +usbredir_device_disconnect (dev); + } +} +static void usbredir_ep_info (void *priv,struct usb_redir_ep_info_header *ep_info) {@@ -1286,7 +1301,14 @@ static void usbredir_ep_info(void *priv,case usb_redir_type_invalid:break ;case usb_redir_type_iso: +usbredir_mark_fullspeed_incompatible (dev);
hw/usb/redirect.c static void usbredir_ep_info(void *priv, · line 1314
Quoted 10 lines
hw/usb/redirect.c +6
-0+/* Fall through */ case usb_redir_type_interrupt: +if (!usbredirparser_peer_has_cap (dev->parser, + usb_redir_cap_ep_info_max_packet_size) || + ep_info->max_packet_size[i] >64 ) { +usbredir_mark_fullspeed_incompatible (dev); + }if (dev->endpoint[i].interval ==0 ) {ERROR ("Received 0 interval for isoc or irq endpoint\n" );usbredir_device_disconnect (dev);
Any comments? Or already queued somewhere?
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux
Hi,
Some comments inline, I've a version with all the comments fixed here:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?h=qemu-kvm-1.2-usbredir&id=5e342d2d2186757cc41b2f834e3503cf10e98c2b
Quoted 34 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
This follows the logic of host-linux: If a 2.0 device has no ISO endpoint and no interrupt endpoint with a packet size > 64, we can attach it also to an 1.1 host controller. In case the redir server does not report endpoint sizes, play safe and remove the 1.1 compatibility as well. Moreover, if we detect a conflicting change in the configuration after the device was already attached, it will be disconnected immediately.
Signed-off-by Jan Kiszka <[email protected]>---
Changes in v2:
- fix incompatibility marking via introduction ofcompatible_speedmask
- disconnect device if incompatibility is detected when already attachedhw/usb/redirect.c | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-)hw/usb/redirect.c +1
-0@@ -105,6 +105,7 @@ struct USBRedirDevice {struct usb_redir_interface_info_header interface_info;struct usbredirfilter_rule *filter_rules;int filter_rules_count; +int compatible_speedmask; };static void usbredir_hello (void *priv,struct usb_redir_hello_header *h);
hw/usb/redirect.c static int usbredir_initfn(USBDevice *udev) · line 1043
Quoted 6 lines
hw/usb/redirect.c +3
-0@@ -1037,6 +1038,9 @@ static int usbredir_initfn(USBDevice *udev)/* We'll do the attach once we receive the speed from the usb-host */ udev->auto_attach =0 ; +/* Will be cleared during setup when we find conflicts */ + dev->compatible_speedmask =USB_SPEED_MASK_FULL ; +
This needs to be done in disconnect to, as that resets the device state, as the same usb-redir device may be reused to later redirect another device.
Quoted 17 lines
hw/usb/redirect.c +2
-0/* Let the backend know we are ready */ qemu_chr_fe_open (dev->cs); qemu_chr_add_handlers(dev->cs, usbredir_chardev_can_read,@@ -1177,10 +1181,12 @@ static void usbredir_device_connect(void *priv,case usb_redir_speed_low: speed ="low speed" ; dev->dev.speed =USB_SPEED_LOW ; + dev->dev.speedmask =0 ;break ;case usb_redir_speed_full: speed ="full speed" ; dev->dev.speed =USB_SPEED_FULL ; + dev->dev.speedmask =0 ;break ;case usb_redir_speed_high: speed ="high speed" ;
hw/usb/redirect.c static void usbredir_device_connect(void *priv, · line 1201
Quoted 7 lines
hw/usb/redirect.c +1
-0@@ -1189,6 +1195,7 @@ static void usbredir_device_connect(void *priv,case usb_redir_speed_super: speed ="super speed" ; dev->dev.speed =USB_SPEED_SUPER ; + dev->dev.speedmask =0 ;break ;default : speed ="unknown speed" ;
All the above setting to 0 of speedmask are not necessary, as immediately afterwards we do:
Quoted 10 lines
hw/usb/redirect.c +1
-1@@ -1210,7 +1217,7 @@ static void usbredir_device_connect(void *priv, device_connect->device_class); } - dev->dev.speedmask = (1 << dev->dev.speed); + dev->dev.speedmask = (1 << dev->dev.speed) | dev->compatible_speedmask; dev->device_info = *device_connect;if (usbredir_check_filter (dev)) {
hw/usb/redirect.c static void usbredir_interface_info(void *priv, · line 1284
Quoted 7 lines
hw/usb/redirect.c +4
-0@@ -1271,6 +1278,14 @@ static void usbredir_interface_info(void *priv, } } +static void usbredir_mark_fullspeed_incompatible (USBRedirDevice *dev) +{ + dev->compatible_speedmask &= ~USB_SPEED_MASK_FULL ; +if (dev->dev.attached && dev->dev.port->dev->speed ==USB_SPEED_FULL ) {
This test won't work as for a high speed dev dev->dev.port->dev->speed == USB_SPEED_HIGH
Also this is not the right place to test, as this gets called from middle in the loop over the endpoints, so any ep state cleanup usbredir_device_disconnect() does will then get partially undone by the rest of the loop.
hw/usb/redirect.c static void usbredir_interface_info(void *priv, · line 1285
Quoted 1 line
hw/usb/redirect.c +1
-0+usbredir_device_disconnect (dev);
It would be better to use usbredir_device_reject here, this way the spice-client / usbredirserver also gets notified of the device getting disconnected by qemu.
Quoted 12 lines
hw/usb/redirect.c +4
-0+ } +} +static void usbredir_ep_info (void *priv,struct usb_redir_ep_info_header *ep_info) {@@ -1286,7 +1301,14 @@ static void usbredir_ep_info(void *priv,case usb_redir_type_invalid:break ;case usb_redir_type_iso: +usbredir_mark_fullspeed_incompatible (dev);
hw/usb/redirect.c static void usbredir_ep_info(void *priv, · line 1314
Quoted 10 lines
hw/usb/redirect.c +6
-0+/* Fall through */ case usb_redir_type_interrupt: +if (!usbredirparser_peer_has_cap (dev->parser, + usb_redir_cap_ep_info_max_packet_size) || + ep_info->max_packet_size[i] >64 ) { +usbredir_mark_fullspeed_incompatible (dev); + }if (dev->endpoint[i].interval ==0 ) {ERROR ("Received 0 interval for isoc or irq endpoint\n" );usbredir_device_disconnect (dev);
Regards,
Hans
Hi,
Quoted 5 lines · Hans de Goede
Hi,
Some comments inline, I've a version with all the comments fixed here:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?h=qemu-kvm-1.2-usbredir&id=5e342d2d2186757cc41b2f834e3503cf10e98c2b
And I now also have redirecting super-speed mass-storage devices to an emulated EHCI controller working:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?h=qemu-kvm-1.2-usbredir&id=a6bdb97481c62b42e4106e7670364e61acde8037
Not sure what will happen when we actually get UAS devices in this scenario though, will need to test, but UAS devices are very hard to find...
Gerd, do you know where I can buy an UAS device (note a German source is fine) ?
Regards,
Hans
Hi,
Quoted 6 lines
Not sure what will happen when we actually get UAS devices in this scenario though, will need to test, but UAS devices are very hard to find...
Gerd, do you know where I can buy an UAS device (note a German source is fine) ?
No, I only have virtual ones ;)
/me got a usb3 stick, but it is a BOT device.
cheers,
Gerd
Hi,
Quoted 5 lines · Hans de Goede
Hi,
Quoted 2 lines · Hans de Goede
Hi,
Quoted 8 lines
Quoted 3 lines
Some comments inline, I've a version with all the comments fixed here:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?h=qemu-kvm-1.2-usbredir&id=5e342d2d2186757cc41b2f834e3503cf10e98c2bAnd I now also have redirecting super-speed mass-storage devices to an emulated EHCI controller working:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?h=qemu-kvm-1.2-usbredir&id=a6bdb97481c62b42e4106e7670364e61acde8037
Oops this causes full speed devices to get attached as high speed, not good, new revision of both patches here:
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?h=qemu-kvm-1.2-usbredir&id=76231208ad556cceb07f97db349699421d121030
http://cgit.freedesktop.org/~jwrdegoede/qemu/commit/?h=qemu-kvm-1.2-usbredir&id=7a04479a4dd1d810199fbb6d7d36eae6390c36bc
Regards,
Hans