Did PCI/IRQ allocation change significantly after 4.2 kernel?

Rob Groner rgroner at RTD.com
Tue Mar 29 10:15:23 EDT 2016


I'm investigating why our drivers no longer work correctly after the 4.2 kernel.  I have verified that in the 4.4 kernel, interrupts no longer work for us as they did before.  Here are the symptoms:

The driver requests an IRQ, the one that is in the pci_dev structure that comes from pci_get_device().  In most cases, that IRQ is 7.  The request_irq call is successful, and the driver reports that it has IRQ 7.  However, interrupts never arrive after that, and eventually an exception is thrown indicating that interrupts WERE arriving at IRQ 16 and nobody responded to them.

Doing this same test with a 4.2 kernel, I see that even though lspci initially reports that the board is on IRQ 7, after the driver is loaded it then reports that the board is on IRQ 16.  The driver also says it is on IRQ 16, and everything works after that.

Here is what I've found so far:  both kernels report the board is on IRQ 7 according to lspci before the driver is loaded.  After the driver is loaded, the 4.2 kernel lspci says the board is on IRQ 16 and the 4.4 kernel says it is still on IRQ 7.  In both cases, the actual interrupts appear to be coming on IRQ 16 and the 4.4 kernel fails because that is not where the interrupt handler was put.

I have also found that the IRQ associated with the pci_device changes during the pci_enable_device call (before the request_irq call).  In the 4.2 kernel, it changes from 7 to 16, but in the 4.4 kernel it stays 7.  This is the most obvious difference I've found so far between the two kernels.

What I don't understand is why the request_irq call succeeds in the 4.4 kernel, yet interrupts don't arrive on IRQ 7...they go to IRQ 16 instead.

I looked through the LinuxVersions on kernelnewbies.org for 4.3 and 4.4 but did not see anything that looked like it related to IRQs, pci devices, or any of that (at least, for my particular problem).  Can someone direct me to the pertinent documentation about the change if it exists?

I'm walking through the kernel code now to try and find why the 4.2 pci_enable changes the IRQ from 7 to 16, but the 4.4 does not.

Thank you for any help.


Rob Groner
Senior Electronics Engineer
Modules and Systems

RTD Embedded Technologies, Inc.
ISO 9001 and AS9100 Certified
www.rtd.com<http://www.rtd.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160329/41852846/attachment.html 


More information about the Kernelnewbies mailing list