Subject: Re: PCI interrupt question

From: David Hawkins <[email-masked]>
Date: Thu, 03 Dec 2009 12:03:55 -0800

Hi Ira,

> When Linux is assigning BARs and IRQs, it writes the BAR addresses to
> the PCI cards, but does not write the IRQ. This was my experience with
> PCI hotplug.

Ooh, subtle.

>> Bottom line is; if the IRQ field of lspci is 0, then you
>> need to figure out that problem first :)
>>
> 
> In the PCI hotplug case mentioned above, lspci would show the IRQ as 0
> until I called request_irq() in the kernel. Afterwards, the correct IRQ
> showed up in the lspci output.
> 
> Try request_irq(pdev->irq, ....) and see if it works.

You can also try lscpi -xxx, and setpci for writing the
registers. So try cheating and writing to the IRQ register
in the PCI interface.

Another possible problem, you may have your FPGA PCI core
configured in host mode (which can still be a master or target),
and then the IRQ register can not be written.

Cheers,
Dave