]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Revert "musb_hdrc: Fix HNP for OPT quirks"
authorTony Lindgren <tony@atomide.com>
Mon, 10 Sep 2007 16:01:23 +0000 (09:01 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 10 Sep 2007 16:01:23 +0000 (09:01 -0700)
This reverts commit 9c46ce285a7bc23644e0a68a6056b87193bca038.

This patch makes device enumeration flakey.

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

index 40ca9671a0be9e07ef0c3be5488c8ef82899e62b..2ee17a61a5d898bb89915c668f6c6cf368479e7f 100644 (file)
@@ -321,7 +321,6 @@ void musb_hnp_stop(struct musb *musb)
        switch (musb->xceiv.state) {
        case OTG_STATE_A_PERIPHERAL:
        case OTG_STATE_A_WAIT_VFALL:
-       case OTG_STATE_A_WAIT_BCON:
                DBG(1, "HNP: Switching back to A-host\n");
                musb_g_disconnect(musb);
                musb->xceiv.state = OTG_STATE_A_IDLE;
@@ -636,19 +635,9 @@ static irqreturn_t musb_stage0_irq(struct musb * musb, u8 int_usb,
                                musb_writeb(mbase, MUSB_DEVCTL, 0);
                        }
                } else if (is_peripheral_capable()) {
-                       DBG(1, "BUS RESET as %s\n", otg_state_string(musb));
-                       switch (musb->xceiv.state) {
-                       case OTG_STATE_A_PERIPHERAL:
-                       case OTG_STATE_A_WAIT_BCON:     /* OPT TD.4.7-900ms */
-                               musb_hnp_stop(musb);
-                               break;
-                       case OTG_STATE_B_PERIPHERAL:
-                               musb_g_reset(musb);
-                               break;
-                       default:
-                               DBG(1, "Unhandled BUS RESET as %s\n",
-                                       otg_state_string(musb));
-                       }
+                       DBG(1, "BUS RESET\n");
+
+                       musb_g_reset(musb);
                        schedule_work(&musb->irq_work);
                }
 
@@ -740,7 +729,6 @@ static irqreturn_t musb_stage2_irq(struct musb * musb, u8 int_usb,
                        musb_hnp_stop(musb);
                        break;
                case OTG_STATE_A_PERIPHERAL:
-                       musb_hnp_stop(musb);
                        musb_root_disconnect(musb);
                        /* FALLTHROUGH */
                case OTG_STATE_B_WAIT_ACON:
@@ -769,10 +757,7 @@ static irqreturn_t musb_stage2_irq(struct musb * musb, u8 int_usb,
                switch (musb->xceiv.state) {
 #ifdef CONFIG_USB_MUSB_OTG
                case OTG_STATE_A_PERIPHERAL:
-                       /*
-                        * We cannot stop HNP here, devctl BDEVICE might be
-                        * still set.
-                        */
+                       musb_hnp_stop(musb);
                        break;
 #endif
                case OTG_STATE_B_PERIPHERAL: