From: Tony Lindgren Date: Fri, 17 Aug 2007 06:08:09 +0000 (-0700) Subject: musb_hdrc: Keep state as b_idle if disconnected as b_idle X-Git-Tag: v2.6.23-omap1~166 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b2fb71784c64d56e851d8f5c1d62c68fe98933a7;p=linux-2.6-omap-h63xx.git musb_hdrc: Keep state as b_idle if disconnected as b_idle Otherwise OPT FS B TD.5.6 can fail. Signed-off-by: Tony Lindgren --- diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 86a256a2353..88757ce7855 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1962,6 +1962,8 @@ void musb_g_disconnect(struct musb *musb) switch (musb->xceiv.state) { default: #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; break; case OTG_STATE_A_PERIPHERAL: @@ -1971,6 +1973,7 @@ void musb_g_disconnect(struct musb *musb) case OTG_STATE_B_HOST: #endif case OTG_STATE_B_PERIPHERAL: + case OTG_STATE_B_IDLE: musb->xceiv.state = OTG_STATE_B_IDLE; break; case OTG_STATE_B_SRP_INIT: