Vbus is switched off (after a_wait_bcon) whenever a device
is disconnected from musb host even when musb is configured
only as host.Earlier we use to switch on the power using
[echo "F" >/proc/driver/musb_hdrc] but now this proc entry is
deleted thus musb doesn't work after device disconnect.

This patch puts is_otg_enabled() check before scheduling
a switch-off timer in disconnect path.

Signed-off-by: Ajay Kumar Gupta <[EMAIL PROTECTED]>
---
 drivers/usb/musb/musb_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index dbf8861..6856da3 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -767,7 +767,7 @@ static irqreturn_t musb_stage2_irq(struct musb *musb, u8 
int_usb,
                case OTG_STATE_A_HOST:
                case OTG_STATE_A_SUSPEND:
                        musb_root_disconnect(musb);
-                       if (musb->a_wait_bcon != 0)
+                       if (musb->a_wait_bcon != 0 && is_otg_enabled(musb))
                                musb_platform_try_idle(musb, jiffies
                                        + msecs_to_jiffies(musb->a_wait_bcon));
                        break;
-- 
1.5.6

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to