|
From: Alan S. <st...@ro...> - 2010-06-25 15:26:09
|
On Fri, 25 Jun 2010, Peter Stuge wrote: > Ludovic Rousseau wrote: > > libusb returns -99 (LIBUSB_ERROR_OTHER) > .. > > libusb:warning [do_sync_bulk_transfer] unrecognised status code 1 > > Alan's description is helpful. libusb does handle when transfer >=2 > in a multi-URB transfer submitted to Linux fails. libusb discards the > previous transfers Do you mean it discards the as-yet-unsubmitted URBs and cancels the outstanding URBs? > 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. > Ludovic, please try the attached patch. It checks if any data was > already transferred by this multi-URB transfer, and if so returns > without error - and although I think this might work I'm not positive > that it's correct to require any data to have been transferred - > could there have been a 0 byte transfer instead of the 28 here? That does not sound right. Alan Stern |