]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
usb: dwc3: gadget: move us to Default State after reset
authorFelipe Balbi <balbi@ti.com>
Tue, 20 Dec 2011 13:37:21 +0000 (15:37 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 20 Dec 2011 16:28:06 +0000 (18:28 +0200)
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 <balbi@ti.com>
drivers/usb/dwc3/gadget.c

index 026c53cf1645651b735cdcaaf70b52e4b1c27175..cb6870cbc49a4e11816da717b1a8ac263baa88cf 100644 (file)
@@ -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);