Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static irqreturn_t pcie_isr(int irq, void *data)
- {
- struct test_device *ctrl = (struct test_device *)data;
- u32 status;
- …
- status = readl(ctrl->reg + INT_STATUS);
- /*
- * Check to see if it was our interrupt
- */
- if (!(status & 0x000C))
- return IRQ_NONE;
- /* Clear the interrupt */
- writel(status, ctrl->reg + INT_STATUS);
- if (status & 0x0004) {
- /*
- * Tx interrupt pending.
- */
- ....
- }
- if (status & 0x0008) {
- /* Rx interrupt Pending */
- /* The system freezes if I read again the INT_STATUS register as given below */
- status = readl(ctrl->reg + INT_STATUS);
- ....
- }
- ..
- return IRQ_HANDLED;
- }
Add Comment
Please, Sign In to add comment