usb: musb: clear MUSB_INTR_SOF
authorGrazvydas Ignotas <notasas@gmail.com>
Sat, 4 Jul 2015 20:51:00 +0000 (23:51 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 5 Jul 2015 20:33:34 +0000 (23:33 +0300)
MUSB_INTR_SOF is always masked, but still shows up in status register
and causes musb_stage0_irq() to be called needlessly, then work to be
scheduled at the end of musb_stage0_irq(), and that doubles context
switch count.

drivers/usb/musb/musb_core.c

index 7245b89..650a18b 100644 (file)
@@ -1522,6 +1522,8 @@ static irqreturn_t generic_interrupt(int irq, void *__hci)
        spin_lock_irqsave(&musb->lock, flags);
 
        musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB);
+       /* SOF is not enabled, but status is still often set */
+       musb->int_usb &= ~MUSB_INTR_SOF;
        musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX);
        musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX);