On Wed, Sep 22, 2010 at 01:06:56PM +0200, ext Felipe Balbi wrote: > here's in diff form: > > diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c > index d4f18bb..b7d97ac 100644 > --- a/drivers/usb/musb/musb_core.c > +++ b/drivers/usb/musb/musb_core.c > @@ -552,6 +552,9 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, > > DBG(1, "SESSION_REQUEST (%s)\n", otg_state_string(musb)); > > + if (devctl & MUSB_DEVCTL_BDEVICE) > + return; > + > /* IRQ arrives from ID pin sense or (later, if VBUS power > * is removed) SRP. responses are time critical: > * - turn on VBUS (with silicon-specific mechanism) Tested it and it Works fine. Thanks. -- heikki
>From 419cc385ab3fa75c419f6766ea0dc6597e7dad92 Mon Sep 17 00:00:00 2001 From: Heikki Krogerus <ext-heikki.krogerus@xxxxxxxxx> Date: Thu, 9 Sep 2010 16:55:21 +0300 Subject: [PATCH] usb: musb: ignore spurious SESSREQ interrupts This will ignore any SESSREQ interrupt if musb is B state. Charger detection may cause spurious SESSREQ interrupts. Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@xxxxxxxxx> --- drivers/usb/musb/musb_core.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 540c766..4def45d 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -550,6 +550,11 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, if (int_usb & MUSB_INTR_SESSREQ) { void __iomem *mbase = musb->mregs; + if (devctl & MUSB_DEVCTL_BDEVICE) { + DBG(3, "SessReq while on B state\n"); + return IRQ_HANDLED; + } + DBG(1, "SESSION_REQUEST (%s)\n", otg_state_string(musb)); /* IRQ arrives from ID pin sense or (later, if VBUS power -- 1.7.0.4