OSDN Git Service

usb: dwc3: fix implementation of endpoint wedge
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 1 Nov 2013 16:05:12 +0000 (12:05 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2013 15:45:08 +0000 (07:45 -0800)
commite6303463eee8685f5b7d7a1b58f6f7ff1518d3af
treef9c2168eb927e5b4089ca3f539b1ecf5d6fb9e82
parent9126f1f5d338fed3f492b4d49f64178231dce76d
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/ep0.c
drivers/usb/dwc3/gadget.c