|
@@ -271,7 +271,7 @@ static void dwc3_ep0_stall_and_restart(struct dwc3 *dwc)
|
|
|
dwc3_ep0_out_start(dwc);
|
|
|
}
|
|
|
|
|
|
-int dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value)
|
|
|
+int __dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value)
|
|
|
{
|
|
|
struct dwc3_ep *dep = to_dwc3_ep(ep);
|
|
|
struct dwc3 *dwc = dep->dwc;
|
|
@@ -281,6 +281,20 @@ int dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+int dwc3_gadget_ep0_set_halt(struct usb_ep *ep, int value)
|
|
|
+{
|
|
|
+ struct dwc3_ep *dep = to_dwc3_ep(ep);
|
|
|
+ struct dwc3 *dwc = dep->dwc;
|
|
|
+ unsigned long flags;
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ spin_lock_irqsave(&dwc->lock, flags);
|
|
|
+ ret = __dwc3_gadget_ep0_set_halt(ep, value);
|
|
|
+ spin_unlock_irqrestore(&dwc->lock, flags);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
void dwc3_ep0_out_start(struct dwc3 *dwc)
|
|
|
{
|
|
|
int ret;
|