On Fri, 2017-06-02 at 15:13 +1000, Benjamin Herrenschmidt wrote: > On Sat, 2017-05-27 at 21:58 -0400, Alan Stern wrote: > > The interfaces required for a UDC driver are explained to some extent > > by the kerneldoc in include/linux/usb/gadget.h. For anything you still > > don't understand, feel free to ask on this mailing list. > > It's missing docs for the udc callbacks :-) > > One quick question: ->set_halt, when called for clearing a stall (when > does that happen btw ? I though only the host would do that), should > it also reset the data toggle like a CLEAR_FEATURE would do Also, a SET_FEATURE setting a stall, should that nuke pending queued request ? What about things like setting configuration, alt settings etc... all these things are supposed to cleanup endpoint data toggles, should probably nuke all pending requests etc.... UDC drivers don't seem to do it and the "core" doesn't seem to have any kind of tracking of these things... It looks like if the interface driver wants to do the right thing, it needs ->set_halt() to also reset the toggle then ... Cheers, Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html