On Wed, 28 Jul 2004, Todd Fischer wrote: > I have some notes about other aspects of the gadget framework I do not > understand (like the zero field in a request), but am holding off asking > questions or proposing changes to the DocBook documentation until the OTG > changes settle out. > > Overall, I found the division between the gadget driver and the UDC driver > to be well engineered. I didn't add any UDC specific changes to the gadget > driver (except for the mod_data.release related code). There is only a > couple of places in the UDC code where I am still confused (like the ZLP > mentioned above).
I can explain a few things. The ->zero field is simple enough, for example. When the gadget wants to send a response that is shorter than the host expects, it must mark the end of the response with a short packet, that is, shorter than the maxpacket value for the endpoint. If the response's length is evenly divisible by maxpacket this means that the gadget has to send an extra 0-length packet to mark the end of the response. That's what ->zero does; it tells the controller to add an extra zero-length packet at the end of the IN data _if_ the buffer length is an even multiple of the maxpacket value and the buffer length isn't zero already. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
