]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
musb_hdrc: Keep state as b_idle if disconnected as b_idle
authorTony Lindgren <tony@atomide.com>
Fri, 17 Aug 2007 06:08:09 +0000 (23:08 -0700)
committerTony Lindgren <tony@atomide.com>
Fri, 17 Aug 2007 11:23:01 +0000 (04:23 -0700)
Otherwise OPT FS B TD.5.6 can fail.

Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/usb/musb/musb_gadget.c

index 86a256a2353911001d25c2fd36beffd0f628b271..88757ce7855591750153309d431f25ee34eebcf5 100644 (file)
@@ -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: