]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/usb/musb/cppi_dma.c
USB: musb: fix for crash in DM646x USB when (CPPI)DMA is enabled
[mv-sheeva.git] / drivers / usb / musb / cppi_dma.c
index ef2332a9941dec7a39c25d52a69b4fce3943771d..a44a450c860d9e248c3c317d437c67abc4694a8f 100644 (file)
@@ -1154,8 +1154,11 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
        struct musb_hw_ep       *hw_ep = NULL;
        u32                     rx, tx;
        int                     i, index;
+       unsigned long           flags;
 
        cppi = container_of(musb->dma_controller, struct cppi, controller);
+       if (cppi->irq)
+               spin_lock_irqsave(&musb->lock, flags);
 
        tibase = musb->ctrl_base;
 
@@ -1285,6 +1288,9 @@ irqreturn_t cppi_interrupt(int irq, void *dev_id)
        /* write to CPPI EOI register to re-enable interrupts */
        musb_writel(tibase, DAVINCI_CPPI_EOI_REG, 0);
 
+       if (cppi->irq)
+               spin_unlock_irqrestore(&musb->lock, flags);
+
        return IRQ_HANDLED;
 }