On Thu, Jan 24, 2013 at 9:42 AM, Pete Batard <p...@akeo.ie> wrote: > On 2013.01.23 14:48, Xiaofan Chen wrote: >> Again, the above leads to me to think that the ALLOW_PARTIAL_READS >> pipe policy has some linkage to USBD_SHORT_TRANSFER_OK >> and I am not so sure if libusbK is really at fault here. > > The way I see it is currently libusbK does not do what WinUSB does, so > at least part of a fix needs to happen in libusbK. I was able to > demonstrate that a simple change in libusbK could make transfers behave > the same as WinUSB, and since we're initializing both libusbK and WinUSB > in the same fashion (due to the common API), I fail to see how the > difference in behaviour could not be libusbK's responsibility.
I was convinced by your explanation last time. I am just getting more confused about the real intended behavior and usage of ALLOW_PARTIAL_READS. > Unless Travis manages to convince Microsoft that WinUSB has a bug, I > think he'll have no choice but to fix libusbK. FYI: Travis is now quite busy and will only look into this later. On the other hand, I think it is good to keep the current work-around in libusbx to set ALLOW_PARTIAL_READS to be TRUE. http://msdn.microsoft.com/en-us/library/windows/hardware/ff540304(v=vs.85).aspx ++++++++++ "ALLOW_PARTIAL_READS (0x05) The default value is TRUE (nonzero). "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." +++++++++++ I think this original libusbx option (before the workaround) will make libusbx less tolerant and it is better to stick to the default of WinUSB to allow this to make libusbx more tolerant to bad device. "Disabling AUTO_FLUSH with ALLOW_PARTIAL_READS enabled causes WinUSB to save the extra data, add the data to the beginning of the caller's next read request, and send it to the caller in the next read operation. Enabling AUTO_FLUSH with ALLOW_PARTIAL_READS enabled causes WinUSB to discard the extra data remaining from the read request." I believe current behavior is "Disabling AUTO_FLUSH with ALLOW_PARTIAL_READS". Is this correct? -- Xiaofan ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel