usb: renesas_usbhs: fixup connection fail
Sometimes the connection fail happen on renesas_usbhs.
This patch fix it up.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index 46e247a..aa591b6 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -462,8 +462,11 @@
* if it already have pipe,
* nothing to do
*/
- if (uep->pipe)
+ if (uep->pipe) {
+ usbhs_pipe_clear(uep->pipe);
+ usbhs_pipe_clear_sequence(uep->pipe);
return 0;
+ }
pipe = usbhs_pipe_malloc(priv, desc);
if (pipe) {