On Wed, Aug 29, 2012 at 9:30 AM, Xiaofan Chen <xiaof...@gmail.com> wrote: > On Wed, Aug 29, 2012 at 8:01 AM, Pete Batard <p...@akeo.ie> wrote: >> Now, with regards to where in libusbx or libusbK lies the problem, in >> xusb, we do call libusb_bulk_transfer() and tell it we expect 36 bytes, >> which is what K also indicates we receive. And according to what the >> MSDN has to say on ALLOW_PARTIAL_READS [3], "Disabling >> ALLOW_PARTIAL_READS causes the read requests to fail whenever the device >> returns more data (on bulk and interrupt IN endpoints) than the caller >> requested". Thus, considering that 36 bytes is what K reports, and we're >> therefore not getting more data than we expect, even with >> ALLOW_PARTIAL_READS disabled, I think K should let the transfer go through. >> >> Especially I don't think the comparison between stageLength and >> MaximumPacketSize, that K does to decide what it should do with the >> ALLOW_PARTIAL_READS flag, is what ALLOW_PARTIAL_READS is really about. >> >> Still, if needed, I don't see a major problem enabling >> ALLOW_PARTIAL_READS in 1.0.13 (thought we want to check why we decided >> to disable it in the first place, as some people may rely on it), but if >> Travis agrees that the current implementation of ALLOW_PARTIAL_READS >> might be off in K, I'd prefer a fix in there. >> > > I will check with Travis. But he is busy now with some other things so > I do not expect a quick response from him right now.
This is the initial discussion about this flag. http://libusb.6.n5.nabble.com/To-understand-the-behavior-of-WinUSB-backend-td510213.html The the decision was to disable it since Linux does not support the behavior. But I still have the same reservation as at that time. I wrote at that time. "All in all, I think it is difficult to only set a default for these flags. The flags are there for a reason. So maybe it is a good idea to provide an API for the users to choose the option. Probably for next libusb 1.1... " On the other hand, such API will have some platform specific options and some people may not like this kind of API. -- Xiaofan ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel