From: "Michael S. Tsirkin" <mst@redhat.com>
To: Christian Krause <chkr@plauener.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH, RESEND] usb: increase buffer for USB control requests
Date: Sun, 24 Jan 2010 23:20:34 +0200 [thread overview]
Message-ID: <20100124212034.GA6415@redhat.com> (raw)
In-Reply-To: <20100124163452.GB8270@gondor.middle-earth.priv>
On Sun, Jan 24, 2010 at 05:34:52PM +0100, Christian Krause wrote:
> Resend. The patch was already sent to the list on 2009-12-11. It would
> be great if it could be reviewed and applied. Thank you very much
> in advance.
>
> 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 <chkr@plauener.de>
Are there any drawbacks to make\ing the buffer larger?
If no, let's just make it 64K? IIUC that's a maximum
length for control transfers as length is a 16 bit field.
> ---
> 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 {
> --
> 1.6.2.5
>
>
next prev parent reply other threads:[~2010-01-24 21:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-24 16:34 [Qemu-devel] [PATCH, RESEND] usb: increase buffer for USB control requests Christian Krause
2010-01-24 21:20 ` Michael S. Tsirkin [this message]
2010-01-25 22:51 ` [Qemu-devel] " Christian Krause
2010-02-06 16:15 ` [Qemu-devel] " Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100124212034.GA6415@redhat.com \
--to=mst@redhat.com \
--cc=chkr@plauener.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).