When in doubt, RTFM. In particular, read the USB specs. The maximum bulk
data packet size is different for USB 1, USB 2, and USB 3. Since the USB
spec is a fre download from the USB site (I think it is www.usb.org),
there’s no reason to not have it.
I no longer remember the packet sizes for each, but I think each revision
multiplied the size by 2.
My suspicion is that if you expect to get an entire packet, the URB must
be the maximum packet size for that level of device, and 600 isn’t. My
memory is that whatever packet is received is returned in accordance with
the URB specification, but that the remaindervof the packet is not
retained for the next call. Every example I’ve seen uses the “native” max
packet size for the USB revision level, so I suspect that you odd transfer
size is the problem.
Also, all the examples I’ve seen send only one URB down, and in the
completion routine either complete the read IRP or send a request down for
the next fragment, rather than firing off a large number of URBs, but that
may simply reflect a history of how it was done in the original DDK
example.
joe
Hello All,
I am currently looking through USB documentation and examples and would
like to ask a question about size of read transfer.
Efficiency aside, I would like to understand the theory of things.
In WDM example, USB transfer is “staged” by multiple URBs, each is a
multiply of max_packet_size.
A thread in this regard here suggests splitting the transaction into
512bytes stages, with <32 simultaneous URBs.
Now here is my question - when I try to make a single URB transaction
request of 600bytes over bulk usb 2.0 HS endpoint, I get USBD_CRC_ERROR
from host controller, while 1024bytes single transfer is working just
fine.
Now i have been thinking - if the host controller breaks the request into
512b sized packets anyway, what would it return an error on attempt to
send 600bytes ?
Can this be HW related only ?
Generally, how does the host controller handle a single bulk read URB of
size >512b ?
Thanks
Sagi
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer