Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - large bulk transfer request crashing io-usb: (2 Items)
   
large bulk transfer request crashing io-usb  
I'm writing a class driver for a USB device under Neutrino 6.4.0.

In certain modes this device may create data packets as large as 24576 bytes (i.e. 3 * 8192 bytes) which are transferred
 using bulk I/O requests.

When the class driver requests a bulk transfer of this size, the usb stack makes the completion callback into the class 
driver, which I handle and then, the request is now technically complete, I delete the URB and the buffer associated 
with the request. But then, mysteriously, the usb stack makes two more completion callbacks into the driver, passing me 
the address of the URB that I have just deleted. Any further activity with this USB device causes io-usb to crash (as it
 has apparently walk over its internal memory). At this point I can't simply restart io-usb -- it appears to just hang. 
I have to reboot the system.

The next largest packet size that the device will generate is 12288 bytes (i.e. 3 * 4096 bytes). I can transfer packets 
of this size from the device all day long with no problem.

Any ideas? Does io-usb have an artificial upper limit on the size supported for I/O requests?

Thanks
Dan
Re: large bulk transfer request crashing io-usb  
What's the maxpaktsize of the bulk pipe you are using? Theoretically, there is no limit of transfer size (as long as you
 can request enough memory in the system. 

How do you setup the usbd_io call and how do you handle the callback?