mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] increase the usbdevfs control transfer buffer size
@ 2005-10-01 20:01 Christopher Li
  0 siblings, 0 replies; only message in thread
From: Christopher Li @ 2005-10-01 20:01 UTC (permalink / raw)
  To: linux-usb-devel; +Cc: linux kernel mail list

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-01 23:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-01 20:01 [PATCH] increase the usbdevfs control transfer buffer size Christopher Li

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®