2012-12-16 23:27:22 +00:00
|
|
|
From 8d5e4be8a36f93cd97c426285a65d66b9ac64bd7 Mon Sep 17 00:00:00 2001
|
2012-09-07 15:20:05 +00:00
|
|
|
From: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
Date: Thu, 6 Sep 2012 20:52:36 +0200
|
2012-10-28 18:05:07 +00:00
|
|
|
Subject: [PATCH] usb-redir: Store max_packet_size in endp_data
|
2012-09-07 15:20:05 +00:00
|
|
|
|
|
|
|
So that we've a place to migrate it to / from to allow restoring it after
|
|
|
|
migration.
|
|
|
|
|
|
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
|
---
|
|
|
|
hw/usb/redirect.c | 4 +++-
|
|
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
|
2012-10-28 18:05:07 +00:00
|
|
|
index cdd705f..6eb3c6d 100644
|
2012-09-07 15:20:05 +00:00
|
|
|
--- a/hw/usb/redirect.c
|
|
|
|
+++ b/hw/usb/redirect.c
|
|
|
|
@@ -57,6 +57,7 @@ struct endp_data {
|
|
|
|
uint8_t type;
|
|
|
|
uint8_t interval;
|
|
|
|
uint8_t interface; /* bInterfaceNumber this ep belongs to */
|
|
|
|
+ uint16_t max_packet_size; /* In bytes, not wMaxPacketSize format !! */
|
|
|
|
uint8_t iso_started;
|
|
|
|
uint8_t iso_error; /* For reporting iso errors to the HC */
|
|
|
|
uint8_t interrupt_started;
|
2012-10-28 18:05:07 +00:00
|
|
|
@@ -1300,7 +1301,8 @@ static void usbredir_ep_info(void *priv,
|
2012-09-07 15:20:05 +00:00
|
|
|
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];
|
|
|
|
+ dev->endpoint[i].max_packet_size =
|
|
|
|
+ usb_ep->max_packet_size = ep_info->max_packet_size[i];
|
|
|
|
}
|
|
|
|
if (ep_info->type[i] == usb_redir_type_bulk) {
|
|
|
|
usb_ep->pipeline = true;
|
|
|
|
--
|
2012-12-16 23:27:22 +00:00
|
|
|
1.8.0.2
|
2012-09-07 15:20:05 +00:00
|
|
|
|