From: Tony Lindgren Date: Wed, 26 Sep 2007 17:40:27 +0000 (-0700) Subject: musb_hdrc: Don't idle as host if VBUS timeout is 0 X-Git-Tag: v2.6.23-omap1~17 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=901dcc448968cae7b9898c33c3df85236d837851;p=linux-2.6-omap-h63xx.git musb_hdrc: Don't idle as host if VBUS timeout is 0 VBUS must be on all the time in this case. Signed-off-by: Tony Lindgren --- diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c index 16eaa4825c3..3008b6de14f 100644 --- a/drivers/usb/musb/tusb6010.c +++ b/drivers/usb/musb/tusb6010.c @@ -482,7 +482,9 @@ void musb_platform_try_idle(struct musb *musb, unsigned long timeout) if (timeout == 0) timeout = default_timeout; - if (musb->is_active) { + /* Never idle if active, or when VBUS timeout is not set as host */ + if (musb->is_active || ((musb->a_wait_bcon == 0) + && (musb->xceiv.state == OTG_STATE_A_WAIT_BCON))) { DBG(4, "%s active, deleting timer\n", otg_state_string(musb)); del_timer(&musb_idle_timer); last_timer = jiffies;