On Mon, May 22, 2017 at 10:35:08AM +0000, Bernat, Yehezkel wrote: > > > > -----Original Message----- > > From: Mika Westerberg [mailto:[email protected]] > > Sent: Monday, May 22, 2017 11:52 > > To: Andreas Noever <[email protected]> > > Cc: Greg Kroah-Hartman <[email protected]>; Jamet, Michael > > <[email protected]>; Bernat, Yehezkel > > <[email protected]>; Lukas Wunner <[email protected]>; Levy, > > Amir (Jer) <[email protected]>; Andy Lutomirski <[email protected]>; > > [email protected]; [email protected]; Andy Shevchenko > > <[email protected]>; [email protected] > > Subject: Re: [PATCH 04/24] thunderbolt: Add MSI-X support > > > > On Sun, May 21, 2017 at 07:51:09PM +0200, Andreas Noever wrote: > > > On Thu, May 18, 2017 at 4:38 PM, Mika Westerberg > > > <[email protected]> wrote: > > > > Intel Thunderbolt controllers support up to 16 MSI-X vectors. Using > > > Is that true for all generations? If so can we remove the legacy path? > > > > Yes, I think it has been the case from the beginning. I have here one > > Mac Mini with Light Ridge and even it has working MSI-X. > > > > Yehezkel, Michael, Amir, do you know if that's the case for all other > > controller as well? > > We are checking it, but what if we don't get the MSI-X we need? > Don't we have to support MSI as a fallback option or maybe we are sure > this will never happen in modern kernels?
Indeed, I think it makes sense to keep the fallback code just to be sure it still works if for some reason we don't get the MSI-X vectors. I think there is even a command line option to turn MSI-(X) off completely. Regarding this, I see that I'm missing a flag in the second call: pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI); should probably be pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI | PCI_IRQ_LEGACY); instead to make it work with legacy IRQs as well.

