summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-12-20 15:37:21 +0200
committerFelipe Balbi <balbi@ti.com>2011-12-20 18:28:06 +0200
commit961906edb549c95f4cc33e4f3dbfd0fcc364954d (patch)
tree6c89b169ae2e5ae12c3bcbf341bf14197011a0e5 /drivers/usb
parent68d3e668d245bb8300c7c6ddbc8508ddfe352e0f (diff)
downloadblackbird-op-linux-961906edb549c95f4cc33e4f3dbfd0fcc364954d.tar.gz
blackbird-op-linux-961906edb549c95f4cc33e4f3dbfd0fcc364954d.zip
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 <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc3/gadget.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 026c53cf1645..cb6870cbc49a 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);
OpenPOWER on IntegriCloud