Home > OS >  Programming PCIe drive, use master bus, can read and write, interrupt problem
Programming PCIe drive, use master bus, can read and write, interrupt problem

Time:11-01

I am doing master Bus, meet a problem! I can read and write properly, with interrupt:
I made the following registration:
Request_irq (devInfo - & gt; GIrq, & amp; XPCIe_IRQHandler IRQF_SHARED, DRIVER_NAME devInfo - & gt; PciDev) :
Completion of registration,
I interrupt response function is as follows:
The static irqreturn_t XPCIe_IRQHandler (int irq, void * dev_id)
{
U32 I, regx;
If (devInfo - & gt; PciDev! Dev_id=)
{
Printk (KERN_WARNING "dev_id=0 x % x", dev_id);
Return IRQ_NONE;
}
Printk (KERN_WARNING "devInfo - & gt; PciDev x=0 x % \ n, "devInfo - & gt; PciDev);
Printk (KERN_WARNING "dev_id=0 x % x \ n", dev_id);
Printk (KERN_WARNING "irq=% d \ n", irq);
Printk (KERN_WARNING "% s: Interrupt Handler Start.. \ n ", BOARD_NAME);
For (I=0; i <49. I++)
{
Regx=XPCIe_ReadReg (I);
Printk (KERN_WARNING "% s: REG<% d> X: 0 X % \ n ", BOARD_NAME, I, regx);
}
Printk (KERN_WARNING "% s Interrupt Handler End.. \ n ", BOARD_NAME);
Return IRQ_HANDLED;//the interrupt is caused by this equipment
}
When I start the interrupt, external devices only produced an interruption, but my program and the interrupt constantly response function XPCIe_IRQHandler
Would you please tell me why this is, I need to modify, thank you.
  • Related