On Tue, 20 Feb 2007, Guido Körber wrote: > Using maxPacketSize instead of ReportSize is never an option. > > maxPacketSize signifies the maximum physical transfer size supported > by an individual endpoint. This value may be lower, equal, or higher > than ReportSize. In the last case multiple transfers will be > conducted to transfer a single report. > > If the device defines multiple reports on the same endpoint they > don't need to have the same size, each single one may have its > individual size. This is another case where using maxPacketSize will > fail. > > So unless your approach is to accept any report up to maxPacketSize > it is a bug to use maxPacketSize. And then still you will face > problems if you have to handle a report that is larger than > maxPacketSize.
Like I said before, it depends on what your purpose is. For example, let's suppose your purpose is to process all the report data contained in a packet, and let's suppose that ReportSize < wMaxPacketSize. If you look at only the first ReportSize bytes then you will process only the first report. But if you look at all wMaxPacketSize bytes then you will process all the reports contained in the packet -- which obviously is what you want. Alan Stern ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
