I have a question about the buffer size limit in the setup URB.
This limit is in the usbdevfs, the usb core seems doesn't care:
in devio.c, function proc_submiturb:
/* min 8 byte setup packet, max arbitrary */
if (uurb.buffer_length < 8 || uurb.buffer_length >
PAGE_SIZE)
return -EINVAL;
So usbdevfs will refuse to serve the setup packet bigger than one page.
Is there a reason why is that? I am asking because some user get some
devices try to send setup packet bigger than one page. VMware can't
pass it to linux kernel using usbdevfs. And I can't find this limit
on the usb spec either.
We bought such a device from ebay just to verify. It is a usb scanner,
Artec e+ 48u. I install it on a real machine and run USBSnoopyPro
on it. There are many setup transaction is using 4096 bytes buffer.
So the total size of the urb is 4096+8 bytes, which can't pass to usbdevfs.
Such big setup URB exists on both direction. And it don't appear as
device string etc. I paste the log as follows, the data buffer dump has
been truncated.
Should we increase that limit for usbdevfs? i.e. kmalloc a buffer instead?
Thanks,
Chris
7 out down n/a 5.539 VENDOR_DEVICE 02 00 48 02 0c ea ff
ff
URB Header (length: 80)
SequenceNumber: 7
Function: 0017 (VENDOR_DEVICE)
PipeHandle: 00000000
SetupPacket:
0000: 00 01 0b 20 00 00 04 00
bmRequestType: 00
DIR: Host-To-Device
TYPE: Standard
RECIPIENT: Device
bRequest: 01
CLEAR_FEATURE
TransferBuffer: 0x00001000 (4096) length
0000: 02 00 48 02 0c ea ff ff ff ff ff 02 0d 85 ff ff
0010: ff ff ff 02 0d 24 ff ff ff ff ff 02 0d a4 ff ff
0020: ff ff ff 02 0d a9 ff ff ff ff ff 02 0d a8 ff ff
0030: 90 ff 80 e0 d2 e0 f0 00 00 00 00 00 12 12 39 32
0040: 02 00 48 75 87 01 01 43 e4 f5 d0 75 81 bf f8 f6
8 in down n/a 5.618 VENDOR_DEVICE -
URB Header (length: 80)
SequenceNumber: 8
Function: 0017 (VENDOR_DEVICE)
PipeHandle: 852a7d94
SetupPacket:
0000: 00 01 0c 20 00 00 00 10
bmRequestType: 00
DIR: Host-To-Device
TYPE: Standard
RECIPIENT: Device
bRequest: 01
CLEAR_FEATURE
No TransferBuffer
8 in up n/a 5.684 CONTROL_TRANSFER 02 00 48 02 0c ea ff
ff 0x00000000
URB Header (length: 80)
SequenceNumber: 8
Function: 0008 (CONTROL_TRANSFER)
PipeHandle: 852a7d94
SetupPacket:
0000: c0 01 0c 20 00 00 00 10
bmRequestType: c0
DIR: Device-To-Host
TYPE: Vendor
RECIPIENT: Device
bRequest: 01
TransferBuffer: 0x00001000 (4096) length
0000: 02 00 48 02 0c ea ff ff ff ff ff 02 0d 85 ff ff
0010: ff ff ff 02 0d 24 ff ff ff ff ff 02 0d a4 ff ff
0020: ff ff ff 02 0d a9 ff ff ff ff ff 02 0d a8 ff ff
0030: 90 ff 80 e0 d2 e0 f0 00 00 00 00 00 12 12 39 32
0040: 02 00 48 75 87 01 01 43 e4 f5 d0 75 81 bf f8 f6
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel