I am trying to enable multiple MSI irq lines in a kernel module. I am operating in RC mode. The problem is when I call pci_enable_msi_block()
it will not allocate more than 1 MSI. If I call pci_enable_msi_block(dev, 32)
it will return 4 (which I assume should mean I can use 4 MSI). I then call pci_enable_msi_block(dev,4)
and it returns 1.
Here is an output from $lspci -v
after insmod Custom_module.ko
but with only a successful enable of 1 MSI
00:00.0 PCI bridge: Texas Instruments Device 8888 (rev 01) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Memory at <ignored> (32-bit, non-prefetchable)
Memory at <ignored> (32-bit, prefetchable)
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00001000-00001fff
Memory behind bridge: 50000000-501fffff
Prefetchable memory behind bridge: 50200000-503fffff
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Root Port (Slot-), MSI 00
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: pcieport
01:00.0 Memory controller: Xilinx Corporation Device 7022
Subsystem: Xilinx Corporation Device 0007
Flags: bus master, fast devsel, latency 0, IRQ 576
Memory at 50000000 (32-bit, non-prefetchable) [size=1M]
Capabilities: [80] Power Management version 3
Capabilities: [90] MSI: Enable+ Count=4/4 Maskable- 64bit+
Capabilities: [c0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: Custom_Module
How do I go about using more than 1 MSI. I can use JTAG to edit the Enable_MSI registers and then the EP can trigger the MSI, but there is no handler dedicated to these IRQs.