usb: dwc3: fix implementation of endpoint wedge
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 1 Nov 2013 16:05:12 +0000 (12:05 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 3 Jan 2014 04:33:25 +0000 (04:33 +0000)
commit653106814a7591093b28f23a5d0d207121672781
tree881b71e0f6a85a70c2d8664838748e7a6e9fde92
parenteeddb0ad331b977136b213d5656d4ab08f52484f
usb: dwc3: fix implementation of endpoint wedge

commit a535d81c92615b8ffb99b7e1fd1fb01effaed1af upstream.

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>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/dwc3/ep0.c
drivers/usb/dwc3/gadget.c