From patchwork Wed Sep 12 13:08:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 183360 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BAACE2C0088 for ; Wed, 12 Sep 2012 23:08:07 +1000 (EST) Received: from localhost ([::1]:58455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBmfl-0001gU-L8 for incoming@patchwork.ozlabs.org; Wed, 12 Sep 2012 09:08:05 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBmfL-0001K4-5e for qemu-devel@nongnu.org; Wed, 12 Sep 2012 09:07:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBmfG-0006Nj-H0 for qemu-devel@nongnu.org; Wed, 12 Sep 2012 09:07:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBmfG-0006Nd-90 for qemu-devel@nongnu.org; Wed, 12 Sep 2012 09:07:34 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8CD7Xs7019431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 Sep 2012 09:07:33 -0400 Received: from shalem.localdomain.com (vpn-8-211.rdu.redhat.com [10.11.8.211]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8CD7Qij003532; Wed, 12 Sep 2012 09:07:32 -0400 From: Hans de Goede To: Gerd Hoffmann Date: Wed, 12 Sep 2012 15:08:36 +0200 Message-Id: <1347455320-10809-5-git-send-email-hdegoede@redhat.com> In-Reply-To: <1347455320-10809-1-git-send-email-hdegoede@redhat.com> References: <1347455320-10809-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Hans de Goede , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 5/9] usb-redir: Store max_packet_size in endp_data X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org So that we've a place to migrate it to / from to allow restoring it after migration. Signed-off-by: Hans de Goede --- hw/usb/redirect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;