diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-09-03 11:49:07 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-11 07:43:00 +0200 |
commit | 0fde3b7a826aa654612126cdea9832319a34172c (patch) | |
tree | 3c27a1cc3bcb8358d6efcb79b0486be4082bc859 /hw | |
parent | be4a892846651e06dbbd9a48aa877f4e0397d01e (diff) |
usb-redir: Set ep max_packet_size if available
This is needed for usb-redir to work properly with the xhci emulation.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb/redirect.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index eeeb003c5b..a91e073aa9 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -805,6 +805,7 @@ static void usbredir_chardev_open(USBRedirDevice *dev) usbredirparser_caps_set_cap(caps, usb_redir_cap_connect_device_version); usbredirparser_caps_set_cap(caps, usb_redir_cap_filter); + usbredirparser_caps_set_cap(caps, usb_redir_cap_ep_info_max_packet_size); usbredirparser_caps_set_cap(caps, usb_redir_cap_64bits_ids); usbredirparser_init(dev->parser, version, caps, USB_REDIR_CAPS_SIZE, 0); usbredirparser_do_write(dev->parser); @@ -1180,6 +1181,10 @@ static void usbredir_ep_info(void *priv, i & 0x0f); usb_ep->type = dev->endpoint[i].type; usb_ep->ifnum = dev->endpoint[i].interface; + if (usbredirparser_peer_has_cap(dev->parser, + usb_redir_cap_ep_info_max_packet_size)) { + usb_ep->max_packet_size = ep_info->max_packet_size[i]; + } } } |