From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC4y9-0002q2-0H for qemu-devel@nongnu.org; Thu, 13 Sep 2012 04:40:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TC4xx-0007CM-Vt for qemu-devel@nongnu.org; Thu, 13 Sep 2012 04:40:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC4xx-00079b-OM for qemu-devel@nongnu.org; Thu, 13 Sep 2012 04:40:05 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8D8e4MU011427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Sep 2012 04:40:04 -0400 From: Gerd Hoffmann Date: Thu, 13 Sep 2012 10:39:56 +0200 Message-Id: <1347525600-28220-11-git-send-email-kraxel@redhat.com> In-Reply-To: <1347525600-28220-1-git-send-email-kraxel@redhat.com> References: <1347525600-28220-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 10/14] usb-redir: Store max_packet_size in endp_data List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Hans de Goede , Gerd Hoffmann From: Hans de Goede So that we've a place to migrate it to / from to allow restoring it after migration. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index f474da8..3196665 100644 --- 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; @@ -1278,7 +1279,8 @@ static void usbredir_ep_info(void *priv, 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; -- 1.7.1