I am using an iMX6 quad core running Linux v4.1.15 (Yocto) as a root complex. Currently whenever I try to get MSI-X implemented it fails even though the same driver code works when running my hardware with an Intel i7 (kernel v3). The APIs that fail are:
All of the above fail and return EINVAL (22). I am able to get a single MSI (non -X) working on the iMX6 with pci_enable_msi(). When running my driver on the iMX6 the pci_msix_vec_count() returns the correct MSI-X count which can also be verified through "lspci -v". According to the documentation MSI-X should be functional (as well as multi MSI).
- Does the iMX6 support MSI-X?
- Does the iMX6 support multi MSI (non -X)?
- Are there any kernel flags that need to be set in the configuration?
I started looking through the kernel code to see where a EINVAL could be returned. Now, I am not a Linux expert so the following assumption may be wrong. When going down the path:
- arch_setup_msi_irq() <-- HERE
I noticed that for x86 and PowerPC the arch_setup_msi_irq() is overridden under /arch/x86/kernel/x86_init.c and /arch/powerpc/kernel/msi.c. Within the generic function listed in /drivers/pci/msi.c there is a comment under arch_setup_msi_irqs() that states:
If an architecture wants to support multiple MSI, it needs to override arch_setup_msi_irqs()
I did a search across the Freescale kernel source and I could not find an override for the above function. This leads me to believe that MSI-X and multi MSI (non -X) are not implemented for the iMX6.