From: Bob Liu Date: Sat, 23 Oct 2010 10:12:00 +0000 (-0500) Subject: USB: musb: blackfin: fix dynamic device<->host changing X-Git-Tag: v2.6.37-rc2~23^2~12^2~5 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=68f64714dc35a515a3064b300729e7809bcdd0e0;p=linux.git USB: musb: blackfin: fix dynamic device<->host changing We need to restart the timer in order to recognize USB devices in host-only mode. Signed-off-by: Bob Liu Signed-off-by: Mike Frysinger Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 32cc6d927760..ade45a219c47 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c @@ -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; }