AnsweredAssumed Answered

iMX6: MSI-X not working

Question asked by concerned12345 on Sep 29, 2017
Latest reply on May 3, 2018 by concerned12345

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:

  • pci_enable_msix()
  • pci_enable_msix_range()
  • pci_enable_msix_exact()

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).



  1. Does the iMX6 support MSI-X?
  2. Does the iMX6 support multi MSI (non -X)?
  3. 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:

  • pcie_enable_msix_range()
    • msix_capability_init()
      • pci_msi_setup_msi_irqs()
        • 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.