|
@@ -585,6 +585,9 @@ static int usbhsg_ep_enable(struct usb_ep *ep,
|
|
struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
|
|
struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv);
|
|
struct usbhs_pipe *pipe;
|
|
struct usbhs_pipe *pipe;
|
|
int ret = -EIO;
|
|
int ret = -EIO;
|
|
|
|
+ unsigned long flags;
|
|
|
|
+
|
|
|
|
+ usbhs_lock(priv, flags);
|
|
|
|
|
|
/*
|
|
/*
|
|
* if it already have pipe,
|
|
* if it already have pipe,
|
|
@@ -593,7 +596,8 @@ static int usbhsg_ep_enable(struct usb_ep *ep,
|
|
if (uep->pipe) {
|
|
if (uep->pipe) {
|
|
usbhs_pipe_clear(uep->pipe);
|
|
usbhs_pipe_clear(uep->pipe);
|
|
usbhs_pipe_sequence_data0(uep->pipe);
|
|
usbhs_pipe_sequence_data0(uep->pipe);
|
|
- return 0;
|
|
|
|
|
|
+ ret = 0;
|
|
|
|
+ goto usbhsg_ep_enable_end;
|
|
}
|
|
}
|
|
|
|
|
|
pipe = usbhs_pipe_malloc(priv,
|
|
pipe = usbhs_pipe_malloc(priv,
|
|
@@ -621,6 +625,9 @@ static int usbhsg_ep_enable(struct usb_ep *ep,
|
|
ret = 0;
|
|
ret = 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+usbhsg_ep_enable_end:
|
|
|
|
+ usbhs_unlock(priv, flags);
|
|
|
|
+
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|