|
From: Ludovic R. <lud...@gm...> - 2010-06-26 06:05:50
|
2010/6/26 Peter Stuge <pe...@st...>: > Alan Stern wrote: >> > and sets reap_action=SUBMIT_FAILED. As libusb is >> > reaping the URBs, it notices that one could not be submitted, and >> > returns an error. >> >> I gather that the difficulty is how to tell whether or not a submission >> failure represents an error. The criterion is simple: If the errno >> value from the failed submission ioctl is EREMOTEIO then it's not an >> error (it's merely a rejection because the transer has already >> completed), otherwise it is. > > Thanks for clarifying that! I'm attaching a revised patch to be > applied instead of the previous one. > > The former patch changed the reap code path when URB submission had > failed. This patch instead changes the code path directly after > submission, and if errno == EREMOTEIO then the reap code is > instructed that all is well via reap_action = COMPLETED_EARLY. > > (libusb already handles this situation correctly when all URBs get > submitted and one completes early.) > > While my guess is that the former patch would work for Ludovic this > one is much more correct. Please test it! Will test next week. Thanks -- Dr. Ludovic Rousseau |