dma_controller_irq() should take the lock (and disable interrupts) as
the main interrupt handler does since the functions it calls assume
this to be the case.
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
struct musb_dma_controller *controller =
(struct musb_dma_controller *)private_data;
struct musb_dma_channel *pImplChannel;
struct musb_dma_controller *controller =
(struct musb_dma_controller *)private_data;
struct musb_dma_channel *pImplChannel;
+ struct musb *musb = controller->pDmaPrivate;
u8 *mbase = controller->pCoreBase;
struct dma_channel *pChannel;
u8 bChannel;
u8 *mbase = controller->pCoreBase;
struct dma_channel *pChannel;
u8 bChannel;
u32 dwAddress;
u8 int_hsdma;
irqreturn_t retval = IRQ_NONE;
u32 dwAddress;
u8 int_hsdma;
irqreturn_t retval = IRQ_NONE;
+ unsigned long flags;
+
+ spin_lock_irqsave(&musb->lock, flags);
int_hsdma = musb_readb(mbase, MUSB_HSDMA_INTR);
if (!int_hsdma)
int_hsdma = musb_readb(mbase, MUSB_HSDMA_INTR);
if (!int_hsdma)
MUSB_TXCSR_TXPKTRDY);
} else
musb_dma_completion(
MUSB_TXCSR_TXPKTRDY);
} else
musb_dma_completion(
- controller->pDmaPrivate,
pImplChannel->epnum,
pImplChannel->transmit);
}
pImplChannel->epnum,
pImplChannel->transmit);
}
}
retval = IRQ_HANDLED;
done:
}
retval = IRQ_HANDLED;
done:
+ spin_unlock_irqrestore(&musb->lock, flags);