peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0051-usb-linux-increase-buffer-for-USB-control-requests.patch

Justin M. Forbes c98f18
From afba60f63354fc6376e30dd51cadeda7170bcf4b Mon Sep 17 00:00:00 2001
Justin M. Forbes c98f18
From: Christian Krause <chkr@plauener.de>
Justin M. Forbes c98f18
Date: Sun, 24 Jan 2010 16:34:52 +0000
Justin M. Forbes c98f18
Subject: [PATCH] usb-linux: increase buffer for USB control requests
Justin M. Forbes c98f18
Justin M. Forbes c98f18
The WLAN USB stick ZyXEL NWD271N (0586:3417) uses very large
Justin M. Forbes c98f18
usb control transfers of more than 2048 bytes which won't fit
Justin M. Forbes c98f18
into the buffer of the ctrl_struct. This results in an error message
Justin M. Forbes c98f18
"husb: ctrl buffer too small" and a non-working device.
Justin M. Forbes c98f18
Increasing the buffer size to 8192 seems to be a safe choice.
Justin M. Forbes c98f18
Justin M. Forbes c98f18
Signed-off-by: Christian Krause <chkr@plauener.de>
Justin M. Forbes c98f18
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Justin M. Forbes c98f18
---
Justin M. Forbes c98f18
 usb-linux.c |    2 +-
Justin M. Forbes c98f18
 1 files changed, 1 insertions(+), 1 deletions(-)
Justin M. Forbes c98f18
Justin M. Forbes c98f18
diff --git a/usb-linux.c b/usb-linux.c
Justin M. Forbes c98f18
index 5619b30..e6cd432 100644
Justin M. Forbes c98f18
--- a/usb-linux.c
Justin M. Forbes c98f18
+++ b/usb-linux.c
Justin M. Forbes c98f18
@@ -113,7 +113,7 @@ struct ctrl_struct {
Justin M. Forbes c98f18
     uint16_t offset;
Justin M. Forbes c98f18
     uint8_t  state;
Justin M. Forbes c98f18
     struct   usb_ctrlrequest req;
Justin M. Forbes c98f18
-    uint8_t  buffer[2048];
Justin M. Forbes c98f18
+    uint8_t  buffer[8192];
Justin M. Forbes c98f18
 };
Justin M. Forbes c98f18
Justin M. Forbes c98f18
 struct USBAutoFilter {
Justin M. Forbes c98f18
-- 
Justin M. Forbes c98f18
1.6.6.1
Justin M. Forbes c98f18