Re: usbfs and MAX_USBFS_BUFFER_SIZE
Pete Zaitcev <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Organization | Red Hat, Inc. |
| Message-ID | <[email protected]> |
On Sat, 01 Dec 2007 18:06:42 +0000, Daniel Drake <[email protected]> wrote: > Can someone explain the purpose of MAX_USBFS_BUFFER_SIZE? > It is defined in drivers/usb/core/devio.c: > > #define MAX_USBFS_BUFFER_SIZE 16384 It's there to prevent random failures because of memory fragmentation, by turning them into reliable failures. > If you want to do a control transfer of larger size, you're out of luck! > You can't divide up control messages like that, since the setup packet > header for each URB is interpreted by the device. > > It looks like the only way to submit control URBs larger than 16kb using > usbfs is to use the synchronous USBDEVFS_CONTROL ioctl -- there is no > async way. The control should be limited to a page. It is preposterous to think of anyone trying to send a control message with a buffer bigger than a couple hundred bytes, a thousand at most. If you managed to trick USBDEVFS_CONTROL into sending more than 16KB at a go, a check must be missing somewhere. -- Pete ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel