Commit b2fb7178 authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Keep state as b_idle if disconnected as b_idle

Otherwise OPT FS B TD.5.6 can fail.
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 4d86df50
...@@ -1962,6 +1962,8 @@ void musb_g_disconnect(struct musb *musb) ...@@ -1962,6 +1962,8 @@ void musb_g_disconnect(struct musb *musb)
switch (musb->xceiv.state) { switch (musb->xceiv.state) {
default: default:
#ifdef CONFIG_USB_MUSB_OTG #ifdef CONFIG_USB_MUSB_OTG
DBG(2, "Unhandled disconnect %s, setting a_idle\n",
otg_state_string(musb));
musb->xceiv.state = OTG_STATE_A_IDLE; musb->xceiv.state = OTG_STATE_A_IDLE;
break; break;
case OTG_STATE_A_PERIPHERAL: case OTG_STATE_A_PERIPHERAL:
...@@ -1971,6 +1973,7 @@ void musb_g_disconnect(struct musb *musb) ...@@ -1971,6 +1973,7 @@ void musb_g_disconnect(struct musb *musb)
case OTG_STATE_B_HOST: case OTG_STATE_B_HOST:
#endif #endif
case OTG_STATE_B_PERIPHERAL: case OTG_STATE_B_PERIPHERAL:
case OTG_STATE_B_IDLE:
musb->xceiv.state = OTG_STATE_B_IDLE; musb->xceiv.state = OTG_STATE_B_IDLE;
break; break;
case OTG_STATE_B_SRP_INIT: case OTG_STATE_B_SRP_INIT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment