From 961906edb549c95f4cc33e4f3dbfd0fcc364954d Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Tue, 20 Dec 2011 15:37:21 +0200 Subject: usb: dwc3: gadget: move us to Default State after reset After a bus reset, we should move our state to Default, in order to be able to re-enumerate again. I only managed to trigger this problem with g_ether by removing the cable after a few transfers had been completed. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/usb') diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 026c53cf1..cb6870c 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1713,6 +1713,9 @@ static void dwc3_gadget_reset_interrupt(struct dwc3 *dwc) dwc3_gadget_disconnect_interrupt(dwc); } + /* after reset -> Default State */ + dwc->dev_state = DWC3_DEFAULT_STATE; + /* Enable PHYs */ dwc3_gadget_usb2_phy_power(dwc, true); dwc3_gadget_usb3_phy_power(dwc, true); -- cgit v1.1