Skip to content

Commit

Permalink
USB: musb: blackfin: fix dynamic device<->host changing
Browse files Browse the repository at this point in the history
We need to restart the timer in order to recognize USB devices in
host-only mode.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Bob Liu authored and Felipe Balbi committed Nov 5, 2010
1 parent 1e393c6 commit 68f6471
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/musb/blackfin.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ static irqreturn_t blackfin_interrupt(int irq, void *__hci)
}

/* Start sampling ID pin, when plug is removed from MUSB */
if (is_otg_enabled(musb) && (musb->xceiv->state == OTG_STATE_B_IDLE
|| musb->xceiv->state == OTG_STATE_A_WAIT_BCON)) {
if ((is_otg_enabled(musb) && (musb->xceiv->state == OTG_STATE_B_IDLE
|| musb->xceiv->state == OTG_STATE_A_WAIT_BCON)) ||
(musb->int_usb & MUSB_INTR_DISCONNECT && is_host_active(musb))) {
mod_timer(&musb_conn_timer, jiffies + TIMER_DELAY);
musb->a_wait_bcon = TIMER_DELAY;
}
Expand Down

0 comments on commit 68f6471

Please sign in to comment.