From: Christopher Li <chrisl@vmware.com>
To: linux-usb-devel@lists.sourceforge.net
Cc: linux kernel mail list <linux-kernel@vger.kernel.org>
Subject: [PATCH] increase the usbdevfs control transfer buffer size
Date: Sat, 1 Oct 2005 16:01:27 -0400 [thread overview]
Message-ID: <20051001200127.GD3453@64m.dyndns.org> (raw)
Increase the size setup data size.
This happen with a few devices that need to send control transfer
with data exactly 4K. But the devio fail those URB, as it count
setup data as part of the 4K size limit as well.
This patch increase the size limit by 8 byte to allow those setup
transfer to pass through.
In theory the size limit of the setup transfer is 64K data.
But I did not see any device need to use more than 4K of data so far.
Tested with EX200 USB explore used in a VM, (which is one of the device
hit this limit.)
Signed-Off-By: Christopher Li <chrisl@vmware.com>
Index: linux-2.6.13.2/drivers/usb/core/devio.c
===================================================================
--- linux-2.6.13.2.orig/drivers/usb/core/devio.c 2005-09-16 18:02:12.000000000 -0700
+++ linux-2.6.13.2/drivers/usb/core/devio.c 2005-09-28 12:56:37.000000000 -0700
@@ -854,7 +854,7 @@ static int proc_do_submiturb(struct dev_
!= USB_ENDPOINT_XFER_CONTROL)
return -EINVAL;
/* min 8 byte setup packet, max arbitrary */
- if (uurb->buffer_length < 8 || uurb->buffer_length > PAGE_SIZE)
+ if (uurb->buffer_length < 8 || uurb->buffer_length > PAGE_SIZE + 8)
return -EINVAL;
if (!(dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL)))
return -ENOMEM;
reply other threads:[~2005-10-01 23:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20051001200127.GD3453@64m.dyndns.org \
--to=chrisl@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®