]> git.openfabrics.org - ~emulex/infiniband.git/commit
usb: gadget: function: uvc: make sure to balance ep enable/disable
authorFelipe Balbi <balbi@ti.com>
Mon, 29 Sep 2014 14:20:35 +0000 (09:20 -0500)
committerFelipe Balbi <balbi@ti.com>
Mon, 20 Oct 2014 20:58:48 +0000 (15:58 -0500)
commitc92bae753722a0010f1cabfb242581e130378b9f
treed75ed6695fc8ba493fca5918809671973ce46b18
parentd7577b389233a74609841492feaf6a55967aa5c8
usb: gadget: function: uvc: make sure to balance ep enable/disable

If a set_alt() to the same alternate setting that's
already selected is received, functions are required
to reset the interface state, this means we must disable
all endpoints and reenable them again.

This is also documented on our kdoc for struct usb_function

* @set_alt: (REQUIRED) Reconfigures altsettings; function drivers may
* initialize usb_ep.driver data at this time (when it is used).
* Note that setting an interface to its current altsetting resets
* interface state, and that all interfaces have a disabled state.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_uvc.c