Guest User

Untitled

a guest
Jan 7th, 2020
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. static irqreturn_t pcie_isr(int irq, void *dev_id)
  2. {
  3. struct test_device *ctrl = data;
  4. u32 status;
  5. …
  6.  
  7. status = readl(ctrl->reg + INT_STATUS);
  8. /*
  9. * Check to see if it was our interrupt
  10. */
  11. if (!(status & 0x000C))
  12. return IRQ_NONE;
  13.  
  14. /* Clear the interrupt */
  15. writel(status, ctrl->reg + INT_STATUS);
  16.  
  17. if (status & 0x0004) {
  18. /*
  19. * Tx interrupt pending.
  20. */
  21. ....
  22. }
  23.  
  24. if (status & 0x0008) {
  25. /* Rx interrupt Pending */
  26. /* The system freezes if I read again the INT_STATUS register as given below */
  27. status = readl(ctrl->reg + INT_STATUS);
  28. ....
  29. }
  30. ..
  31. return IRQ_HANDLED;
  32. }
Add Comment
Please, Sign In to add comment