From: Tony Lindgren Date: Mon, 10 Sep 2007 16:01:23 +0000 (-0700) Subject: Revert "musb_hdrc: Fix HNP for OPT quirks" X-Git-Tag: v2.6.23-omap1~76 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=988f659145cb039d5ad0616f7e28ffb7abb819e8;p=linux-2.6-omap-h63xx.git Revert "musb_hdrc: Fix HNP for OPT quirks" This reverts commit 9c46ce285a7bc23644e0a68a6056b87193bca038. This patch makes device enumeration flakey. Signed-off-by: Tony Lindgren --- diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 40ca9671a0b..2ee17a61a5d 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -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: