Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - PCI/PCIe interrupts don't work as expected: (3 Items)
   
PCI/PCIe interrupts don't work as expected  
Hi,

I am currently porting a device driver from QNX7.1 to QNX8.0 and am observing
weird behavior (maybe a bug?) when it comes to PCI/PCIe interrupts.

When I only use PCIe devices, the interrupt handling using InterruptAttachThread()
or InterruptAttachEvent() and InterruptWait() works like expected.

When I add a PCI device to this combination, this device will stay inside
InterruptWait() and not return anymore.

I am using the x86_64 BSP and I tried it on two DELL Optiplex 9010.

Using only a single PCI device (no PCIe) in those PC's also shows different
results. In one of them it worked as expected, in the other it also stayed inside
InterruptWait().

Flags used for InterruptAttachThread/Event: _NTO_INTR_FLAGS_NO_UNMASK | _NTO_INTR_FLAGS_END.
Flags used for InterruptWait: _NTO_INTR_WAIT_FLAGS_UNMASK | _NTO_INTR_WAIT_FLAGS_FAST.

The devices use legacy interrupts, not MSI.

I attached the output of pci-tool for the working (pcie_only) and failing (pcie_and_pci)
environment. The only thing I see is, that they share an interrupt. The devices
have the vid 15cf and use IRQ 16 & 18. There is also an Intel USB Controller
that uses IRQ 16.

Are there any known PCI/PCIe issues for specific CPU/chipsets?
Does somebody know a way I could debug/resolve this issue?
Attachment: Compressed file pcie_and_pci.zip 9.98 KB
Re: PCI/PCIe interrupts don't work as expected  
I am not a PCI expert, but one thing to watch out for when sharing interrupts is that the source will remain masked as 
long as at least one attached handler has it masked.
You can use the new InterruptQuery() call to see if the source is masked while your driver is waiting for it.

--Elad
Re: PCI/PCIe interrupts don't work as expected  
HI, I tried the InterruptQuery() function and it showed that the source was masked more than once sometimes.
However, it shows the same for PCI and PCIe devices and PCIe devices do work.

I made a mistake in saying that one of the Optilex's worked. I tested it again today and it didn't. However I found a
computer in which all devices (PCI/PCIe) seem to work correctly even when interrupts are shared. Maybe it's an
issue with the hardware (DELL Optiplex 9010, Intel(R) 7 Series/C216 Chipset) or the BSP is not fully configured.

For now this works for me. Thanks for your help.