Alan Stern wrote:
+ req->zero = value < ctrl->wLength + && (value % gadget->ep0->maxpacket) == 0;
While it doesn't hurt to have the (value % maxpacket) == 0 test, is it necessary? Won't controller drivers properly handle the case where req->zero is set and the request already ends with a short packet?
They should handle that, yes. But this way we're covered in all cases.
Also, what if value == 0? Are controller drivers smart enough to know that zero-length packets don't need an additional ZLP?
They should handle that correctly already ... not that many drivers have excuses to send zero length control-IN data stages!
- Dave
Alan Stern
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
