diff mbox

timberdale: Use pci_enable_msix_range() instead of pci_enable_msix()

Message ID 1392804931-30671-3-git-send-email-agordeev@redhat.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Alexander Gordeev Feb. 19, 2014, 10:15 a.m. UTC
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() and pci_enable_msix_range()
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 |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

Comments

Lee Jones Feb. 19, 2014, 11:44 a.m. UTC | #1
> 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() and pci_enable_msix_range()
> 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 |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.
Alexander Gordeev Feb. 21, 2014, 4:56 p.m. UTC | #2
Hi Lee et al,

Based on recently accepted to the mainline pci_enable_msix_exact() function,
I am sending an updated version of the patch. Please, let me know if it does
not work for you and you need and incremental update from the previous version.

Thanks!
diff mbox

Patch

diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
index 2bc5cfb..c2bc6d7 100644
--- a/drivers/mfd/timberdale.c
+++ b/drivers/mfd/timberdale.c
@@ -715,8 +715,9 @@  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);
-	if (err) {
+	err = pci_enable_msix_range(dev, msix_entries,
+				    TIMBERDALE_NR_IRQS, TIMBERDALE_NR_IRQS);
+	if (err < 0) {
 		dev_err(&dev->dev,
 			"MSI-X init failed: %d, expected entries: %d\n",
 			err, TIMBERDALE_NR_IRQS);