]> git.baikalelectronics.ru Git - kernel.git/commitdiff
usb: musb: ignore spurious SESSREQ interrupts
authorHeikki Krogerus <ext-heikki.krogerus@nokia.com>
Fri, 24 Sep 2010 10:44:13 +0000 (13:44 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 22 Oct 2010 17:21:55 +0000 (10:21 -0700)
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@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musb_core.c

index d4f18bbc8f8ff13866b6ca5a15ce9b84f7000bd1..472b2a7e78960f6be2d7e1e9dae047503ceb35c2 100644 (file)
@@ -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