aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r--drivers/usb/renesas_usbhs/mod_gadget.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index c6942d7fec47..f2985cd88021 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -601,7 +601,12 @@ static int usbhsg_ep_disable(struct usb_ep *ep)
601{ 601{
602 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); 602 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
603 603
604 return usbhsg_pipe_disable(uep); 604 usbhsg_pipe_disable(uep);
605
606 uep->pipe->mod_private = NULL;
607 uep->pipe = NULL;
608
609 return 0;
605} 610}
606 611
607static struct usb_request *usbhsg_ep_alloc_request(struct usb_ep *ep, 612static struct usb_request *usbhsg_ep_alloc_request(struct usb_ep *ep,
@@ -753,7 +758,7 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status)
753 usbhsg_dma_map_ctrl); 758 usbhsg_dma_map_ctrl);
754 usbhs_fifo_init(priv); 759 usbhs_fifo_init(priv);
755 760
756 /* dcp init */ 761 /* dcp init instead of usbhsg_ep_enable() */
757 dcp->pipe = usbhs_dcp_malloc(priv); 762 dcp->pipe = usbhs_dcp_malloc(priv);
758 dcp->pipe->mod_private = dcp; 763 dcp->pipe->mod_private = dcp;
759 usbhs_pipe_config_update(dcp->pipe, 0, 0, 64); 764 usbhs_pipe_config_update(dcp->pipe, 0, 0, 64);
@@ -815,7 +820,7 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status)
815 usbhs_sys_set_test_mode(priv, 0); 820 usbhs_sys_set_test_mode(priv, 0);
816 usbhs_sys_function_ctrl(priv, 0); 821 usbhs_sys_function_ctrl(priv, 0);
817 822
818 usbhsg_pipe_disable(dcp); 823 usbhsg_ep_disable(&dcp->ep);
819 824
820 dev_dbg(dev, "stop gadget\n"); 825 dev_dbg(dev, "stop gadget\n");
821 826