Patchwork [v2] timberdale: Use pci_enable_msix_exact() instead of pci_enable_msix()

login
register
mail settings
Submitter Alexander Gordeev
Date Feb. 21, 2014, 4:58 p.m.
Message ID <20140221165809.GI17353@dhcp-26-207.brq.redhat.com>
Download mbox | patch
Permalink /patch/322950/
State Not Applicable
Headers show

Comments

Alexander Gordeev - Feb. 21, 2014, 4:58 p.m.
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range()  or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: linux-pci@vger.kernel.org
---
 drivers/mfd/timberdale.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Lee Jones - Feb. 24, 2014, 4:29 p.m.
On Fri, 21 Feb 2014, Alexander Gordeev wrote:

> As result of deprecation of MSI-X/MSI enablement functions
> pci_enable_msix() and pci_enable_msi_block() all drivers
> using these two interfaces need to be updated to use the
> new pci_enable_msi_range()  or pci_enable_msi_exact()
> and pci_enable_msix_range() or pci_enable_msix_exact()
> interfaces.
> 
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: linux-pci@vger.kernel.org
> ---
>  drivers/mfd/timberdale.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.
Lee Jones - March 3, 2014, 7:25 a.m.
> > As result of deprecation of MSI-X/MSI enablement functions
> > pci_enable_msix() and pci_enable_msi_block() all drivers
> > using these two interfaces need to be updated to use the
> > new pci_enable_msi_range()  or pci_enable_msi_exact()
> > and pci_enable_msix_range() or pci_enable_msix_exact()
> > interfaces.
> > 
> > Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> > Cc: Samuel Ortiz <sameo@linux.intel.com>
> > Cc: Lee Jones <lee.jones@linaro.org>
> > Cc: linux-pci@vger.kernel.org
> > ---
> >  drivers/mfd/timberdale.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> Applied, thanks.

I've reverted this patch, as it doesn't build othognally.

drivers/mfd/timberdale.c:718:2:
  error: implicit declaration of function ‘pci_enable_msix_exact’
     [-Werror=implicit-function-declaration]
Alexander Gordeev - March 3, 2014, 8:10 a.m.
On Mon, Mar 03, 2014 at 03:25:51PM +0800, Lee Jones wrote:
> > Applied, thanks.
> 
> I've reverted this patch, as it doesn't build othognally.
> 
> drivers/mfd/timberdale.c:718:2:
>   error: implicit declaration of function ‘pci_enable_msix_exact’
>      [-Werror=implicit-function-declaration]

I should have to clarify it I think. Do you build on top of 3.14-rc4?

Thanks!
Lee Jones - March 3, 2014, 9:26 a.m.
> > > Applied, thanks.
> > 
> > I've reverted this patch, as it doesn't build othognally.
> > 
> > drivers/mfd/timberdale.c:718:2:
> >   error: implicit declaration of function ‘pci_enable_msix_exact’
> >      [-Werror=implicit-function-declaration]
> 
> I should have to clarify it I think. Do you build on top of 3.14-rc4?

Not yet. Is the required patch in there?
Alexander Gordeev - March 3, 2014, 9:33 a.m.
On Mon, Mar 03, 2014 at 05:26:00PM +0800, Lee Jones wrote:
> > > > Applied, thanks.
> > > 
> > > I've reverted this patch, as it doesn't build othognally.
> > > 
> > > drivers/mfd/timberdale.c:718:2:
> > >   error: implicit declaration of function ‘pci_enable_msix_exact’
> > >      [-Werror=implicit-function-declaration]
> > 
> > I should have to clarify it I think. Do you build on top of 3.14-rc4?
> 
> Not yet. Is the required patch in there?

Yep - commit 302a252 ("PCI/MSI: Add pci_enable_msi_range() and
pci_enable_msix_range()").
Lee Jones - March 3, 2014, 10:04 a.m.
> > > > > Applied, thanks.
> > > > 
> > > > I've reverted this patch, as it doesn't build othognally.
> > > > 
> > > > drivers/mfd/timberdale.c:718:2:
> > > >   error: implicit declaration of function ‘pci_enable_msix_exact’
> > > >      [-Werror=implicit-function-declaration]
> > > 
> > > I should have to clarify it I think. Do you build on top of 3.14-rc4?
> > 
> > Not yet. Is the required patch in there?
> 
> Yep - commit 302a252 ("PCI/MSI: Add pci_enable_msi_range() and
> pci_enable_msix_range()").

Okay, seems to work fine post-rebase.

Reapplied, thanks.

Patch

diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index 2bc5cfb..6ce36d6 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -715,7 +715,7 @@  static int timb_probe(struct pci_dev *dev,
 	for (i = 0; i < TIMBERDALE_NR_IRQS; i++)
 		msix_entries[i].entry = i;
 
-	err = pci_enable_msix(dev, msix_entries, TIMBERDALE_NR_IRQS);
+	err = pci_enable_msix_exact(dev, msix_entries, TIMBERDALE_NR_IRQS);
 	if (err) {
 		dev_err(&dev->dev,
 			"MSI-X init failed: %d, expected entries: %d\n",