From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753353AbdEVLH4 (ORCPT ); Mon, 22 May 2017 07:07:56 -0400 Received: from mga14.intel.com ([192.55.52.115]:44213 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119AbdEVLHz (ORCPT ); Mon, 22 May 2017 07:07:55 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,377,1491289200"; d="scan'208";a="971590402" Date: Mon, 22 May 2017 14:01:16 +0300 From: Mika Westerberg To: "Bernat, Yehezkel" Cc: Andreas Noever , Greg Kroah-Hartman , "Jamet, Michael" , Lukas Wunner , "Levy, Amir (Jer)" , Andy Lutomirski , "Mario.Limonciello@dell.com" , "Jared.Dominguez@dell.com" , Andy Shevchenko , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 04/24] thunderbolt: Add MSI-X support Message-ID: <20170522110116.GV8541@lahna.fi.intel.com> References: <20170518143914.60902-1-mika.westerberg@linux.intel.com> <20170518143914.60902-5-mika.westerberg@linux.intel.com> <20170522085200.GT8541@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 22, 2017 at 10:35:08AM +0000, Bernat, Yehezkel wrote: > > > > -----Original Message----- > > From: Mika Westerberg [mailto:mika.westerberg@linux.intel.com] > > Sent: Monday, May 22, 2017 11:52 > > To: Andreas Noever > > Cc: Greg Kroah-Hartman ; Jamet, Michael > > ; Bernat, Yehezkel > > ; Lukas Wunner ; Levy, > > Amir (Jer) ; Andy Lutomirski ; > > Mario.Limonciello@dell.com; Jared.Dominguez@dell.com; Andy Shevchenko > > ; linux-kernel@vger.kernel.org > > 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 > > > 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.