Blame 0627-usb-redir-Store-max_packet_size-in-endp_data.patch

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