From: Heikki Krogerus <ext-heikki.krogerus@xxxxxxxxx> This will ignore any SESSREQ interrupt if musb is B-device. Charger detection may cause spurious SESSREQ interrupts. Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@xxxxxxxxx> --- drivers/usb/musb/musb_core.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 540c766..fe692bb 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -559,11 +559,16 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, * - ... to A_WAIT_BCON. * a_wait_vrise_tmout triggers VBUS_ERROR transitions */ - musb_writeb(mbase, MUSB_DEVCTL, MUSB_DEVCTL_SESSION); - musb->ep0_stage = MUSB_EP0_START; - musb->xceiv->state = OTG_STATE_A_IDLE; - MUSB_HST_MODE(musb); - musb_set_vbus(musb, 1); + if ((devctl & MUSB_DEVCTL_VBUS) + && !(devctl & MUSB_DEVCTL_BDEVICE)) { + musb_writeb(mbase, MUSB_DEVCTL, MUSB_DEVCTL_SESSION); + musb->ep0_stage = MUSB_EP0_START; + musb->xceiv->state = OTG_STATE_A_IDLE; + MUSB_HST_MODE(musb); + musb_set_vbus(musb, 1); + } else { + DBG(5, "discarding SESSREQ INT\n"); + } handled = IRQ_HANDLED; } -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html