18 May 2005 18:00
usb_reap_async timeout
Scott D. Davilla <davilla <at> 4pi.com>
2005-05-18 16:00:20 GMT
2005-05-18 16:00:20 GMT
I have a question about how usb_reap_async handles timeouts. We have a custom FX2 running in auto-commit slave mode controlled by an fpga. Bulk IN, 512 byte packets, quad buffered. For throughput info, running as fast as possible in a test mode (fpga is writing at the full slave fifo speed of 96MB/s), we see about 39.7MB/s on a 1.2GHz ITX motherboard using on-board USB 2.0 ports under WinXP running headless with remote desktop client. The normal runtime rate is about 10MB/s. We queue up 8 usb_reap_async and start a loop with a timeout of 10000ms. The issue we have is when any timeout occurs on a usb_reap_async call, we get; LIBUSB_DLL error: usb_reap_async: timeout error which make sense, then seven more of; LIBUSB_DLL error: usb_reap_async: error: The I/O operation has been aborted because of either a thread exit or an application request. which does not make sense. At this point, we get a stall at the fpga level until IN packets get reloaded by usb_submit_async. Is the correct behavior, seems like only the usb_reap_async for that context should timeout and the others left alone. Also if one has a usb_reap_async pending, how do you cancel it before the timeout expires. Right now I just release the interface, that works but does not seem correct. Code is below, watch the line wraps.(Continue reading)
RSS Feed