usb: dwc3: fix implementation of endpoint wedge
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 1 Nov 2013 16:05:12 +0000 (12:05 -0400)
committerFelipe Balbi <balbi@ti.com>
Mon, 25 Nov 2013 16:56:45 +0000 (10:56 -0600)
commita535d81c92615b8ffb99b7e1fd1fb01effaed1af
tree2aa52efe0447fdd839d14936cd87817acabeb53c
parent655403c21236af7b121c8c44618e60ff747acc87
usb: dwc3: fix implementation of endpoint wedge

The dwc3 UDC driver doesn't implement endpoint wedging correctly.
When an endpoint is wedged, the gadget driver should be allowed to
clear the wedge by calling usb_ep_clear_halt().  Only the host is
prevented from resetting the endpoint.

This patch fixes the implementation.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Pratyush Anand <pratyush.anand@st.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/ep0.c
drivers/usb/dwc3/gadget.c