From patchwork Fri Dec 11 22:35:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Krause X-Patchwork-Id: 40931 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 89A6BB7BE5 for ; Sat, 12 Dec 2009 09:38:26 +1100 (EST) Received: from localhost ([127.0.0.1]:39626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJE7z-0004fv-Kq for incoming@patchwork.ozlabs.org; Fri, 11 Dec 2009 17:38:23 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJE56-0003c4-Pl for qemu-devel@nongnu.org; Fri, 11 Dec 2009 17:35:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJE51-0003ZL-VG for qemu-devel@nongnu.org; Fri, 11 Dec 2009 17:35:24 -0500 Received: from [199.232.76.173] (port=55867 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJE51-0003ZH-Pp for qemu-devel@nongnu.org; Fri, 11 Dec 2009 17:35:19 -0500 Received: from jessica.hrz.tu-chemnitz.de ([134.109.132.47]:34513) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NJE51-0006Wj-ER for qemu-devel@nongnu.org; Fri, 11 Dec 2009 17:35:19 -0500 Received: from p5b3d5308.dip.t-dialin.net ([91.61.83.8] helo=gondor.middle-earth.priv) by jessica.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1NJE4y-0001Am-0I for qemu-devel@nongnu.org; Fri, 11 Dec 2009 23:35:16 +0100 Date: Fri, 11 Dec 2009 23:35:09 +0100 From: Christian Krause To: qemu-devel@nongnu.org Message-ID: <20091211223509.GA9591@gondor.middle-earth.priv> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Spam-Score: -1.4 (-) X-Scan-Signature: 35a077d52d8eb09d911074c20d374ce4 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: [Qemu-devel] [PATCH] usb: increase buffer for USB control requests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The WLAN USB stick ZyXEL NWD271N (0586:3417) uses very large usb control transfers of more than 2048 bytes which won't fit into the buffer of the ctrl_struct. This results in an error message "husb: ctrl buffer too small" and a non-working device. Increasing the buffer size to 8192 seems to be a safe choice. Signed-off-by: Christian Krause --- usb-linux.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/usb-linux.c b/usb-linux.c index 285ac22..d205bd3 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -113,7 +113,7 @@ struct ctrl_struct { uint16_t offset; uint8_t state; struct usb_ctrlrequest req; - uint8_t buffer[2048]; + uint8_t buffer[8192]; }; struct USBAutoFilter {