|
|
5544c1 |
From 0995eaeb06c4810cd133e710170a7b181caf04cd Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
c8dfc6 |
From: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
Date: Mon, 3 Sep 2012 11:49:07 +0200
|
|
|
5544c1 |
Subject: [PATCH] usb-redir: Set ep max_packet_size if available
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
This is needed for usb-redir to work properly with the xhci emulation.
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
---
|
|
Hans de Goede |
c8dfc6 |
hw/usb/redirect.c | 5 +++++
|
|
Hans de Goede |
c8dfc6 |
1 file changed, 5 insertions(+)
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
|
|
|
5544c1 |
index 321f5be..b9a3633 100644
|
|
Hans de Goede |
c8dfc6 |
--- a/hw/usb/redirect.c
|
|
Hans de Goede |
c8dfc6 |
+++ b/hw/usb/redirect.c
|
|
|
5544c1 |
@@ -814,6 +814,7 @@ static void usbredir_chardev_open(USBRedirDevice *dev)
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
usbredirparser_caps_set_cap(caps, usb_redir_cap_connect_device_version);
|
|
Hans de Goede |
c8dfc6 |
usbredirparser_caps_set_cap(caps, usb_redir_cap_filter);
|
|
Hans de Goede |
c8dfc6 |
+ usbredirparser_caps_set_cap(caps, usb_redir_cap_ep_info_max_packet_size);
|
|
Hans de Goede |
c8dfc6 |
usbredirparser_caps_set_cap(caps, usb_redir_cap_64bits_ids);
|
|
|
5544c1 |
usbredirparser_init(dev->parser, VERSION, caps, USB_REDIR_CAPS_SIZE, 0);
|
|
Hans de Goede |
c8dfc6 |
usbredirparser_do_write(dev->parser);
|
|
|
5544c1 |
@@ -1202,6 +1203,10 @@ static void usbredir_ep_info(void *priv,
|
|
Hans de Goede |
c8dfc6 |
i & 0x0f);
|
|
Hans de Goede |
c8dfc6 |
usb_ep->type = dev->endpoint[i].type;
|
|
Hans de Goede |
c8dfc6 |
usb_ep->ifnum = dev->endpoint[i].interface;
|
|
Hans de Goede |
c8dfc6 |
+ if (usbredirparser_peer_has_cap(dev->parser,
|
|
Hans de Goede |
c8dfc6 |
+ usb_redir_cap_ep_info_max_packet_size)) {
|
|
Hans de Goede |
c8dfc6 |
+ usb_ep->max_packet_size = ep_info->max_packet_size[i];
|
|
Hans de Goede |
c8dfc6 |
+ }
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
--
|
|
|
5544c1 |
1.7.12.1
|
|
Hans de Goede |
c8dfc6 |
|