Skip to contentSkip to conversation

rapidio/tsi721: Use pci_enable_msix_exact() instead of pci_enable_msix()

PATCH RESEND Superseded Alexander Gordeev 3 participants 6 messages May 13, 2014 – May 28, 2014

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND v2 1/1 rapidio/tsi721: Use pci_enable_msix_exact() instead of pci_enable_msix()

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.

---
 drivers/rapidio/devices/tsi721.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
drivers/rapidio/devices/tsi721.c +3 -8
index 1753dc6..2ca1a0b 100644
@@ -768,15 +768,10 @@ static int tsi721_enable_msix(struct tsi721_device *priv)
 	}
 #endif /* CONFIG_RAPIDIO_DMA_ENGINE */
 
-	err = pci_enable_msix(priv->pdev, entries, ARRAY_SIZE(entries));
+	err = pci_enable_msix_exact(priv->pdev, entries, ARRAY_SIZE(entries));
 	if (err) {
-		if (err > 0)
-			dev_info(&priv->pdev->dev,
-				 "Only %d MSI-X vectors available, "
-				 "not using MSI-X\n", err);
-		else
-			dev_err(&priv->pdev->dev,
-				"Failed to enable MSI-X (err=%d)\n", err);
+		dev_err(&priv->pdev->dev,
+			"Failed to enable MSI-X (err=%d)\n", err);
 		return err;
 	}
 
Signature · 1 line
1.7.7.6
author Acked-by Alexandre Bounine on v2 1/1
#1 lore raw
Quoted 10 lines · Alexander Gordeev

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.

Cc Matt Porter <[email protected]>
Cc Alexandre Bounine <[email protected]>

I forgot to note this patch has also been

Quoted 31 lines
---
 drivers/rapidio/devices/tsi721.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
drivers/rapidio/devices/tsi721.c +3 -8
index 1753dc6..2ca1a0b 100644
@@ -768,15 +768,10 @@ static int tsi721_enable_msix(struct tsi721_device *priv)
 	}
 #endif /* CONFIG_RAPIDIO_DMA_ENGINE */
 
-	err = pci_enable_msix(priv->pdev, entries, ARRAY_SIZE(entries));
+	err = pci_enable_msix_exact(priv->pdev, entries, ARRAY_SIZE(entries));
 	if (err) {
-		if (err > 0)
-			dev_info(&priv->pdev->dev,
-				 "Only %d MSI-X vectors available, "
-				 "not using MSI-X\n", err);
-		else
-			dev_err(&priv->pdev->dev,
-				"Failed to enable MSI-X (err=%d)\n", err);
+		dev_err(&priv->pdev->dev,
+			"Failed to enable MSI-X (err=%d)\n", err);
 		return err;
 	}
 
Signature · 1 line
1.7.7.6
Signature · 3 lines
Regards,
Alexander Gordeev
[email protected]
#2 lore raw
In reply to Alexander Gordeev
Quoted 7 lines · On Tue, 13 May 2014 17:01:32 +0200 Alexander Gordeev <[email protected]>…

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.

What (if any) runtime effect does this patch have?

Quoted 23 lines
drivers/rapidio/devices/tsi721.c +3 -8
@@ -768,15 +768,10 @@ static int tsi721_enable_msix(struct tsi721_device *priv)
 	}
 #endif /* CONFIG_RAPIDIO_DMA_ENGINE */
 
-	err = pci_enable_msix(priv->pdev, entries, ARRAY_SIZE(entries));
+	err = pci_enable_msix_exact(priv->pdev, entries, ARRAY_SIZE(entries));
 	if (err) {
-		if (err > 0)
-			dev_info(&priv->pdev->dev,
-				 "Only %d MSI-X vectors available, "
-				 "not using MSI-X\n", err);
-		else
-			dev_err(&priv->pdev->dev,
-				"Failed to enable MSI-X (err=%d)\n", err);
+		dev_err(&priv->pdev->dev,
+			"Failed to enable MSI-X (err=%d)\n", err);
 		return err;
 	}
 
Signature · 1 line
1.7.7.6
#3 lore raw
Quoted 11 lines · Andrew Morton
Quoted 7 lines · On Tue, 13 May 2014 17:01:32 +0200 Alexander Gordeev <[email protected]>…

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.

What (if any) runtime effect does this patch have?

None.

Signature · 3 lines
Regards,
Alexander Gordeev
[email protected]
maintainer
#4 lore raw
In reply to Alexander Gordeev
Quoted 11 lines · Alexander Gordeev

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.

I assume this is being handled by Matt and/or Alexandre (listed in MAINTAINERS). Let me know if I should do anything.

Quoted 34 lines
---
 drivers/rapidio/devices/tsi721.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
drivers/rapidio/devices/tsi721.c +3 -8
index 1753dc6..2ca1a0b 100644
@@ -768,15 +768,10 @@ static int tsi721_enable_msix(struct tsi721_device *priv)
 	}
 #endif /* CONFIG_RAPIDIO_DMA_ENGINE */
 
-	err = pci_enable_msix(priv->pdev, entries, ARRAY_SIZE(entries));
+	err = pci_enable_msix_exact(priv->pdev, entries, ARRAY_SIZE(entries));
 	if (err) {
-		if (err > 0)
-			dev_info(&priv->pdev->dev,
-				 "Only %d MSI-X vectors available, "
-				 "not using MSI-X\n", err);
-		else
-			dev_err(&priv->pdev->dev,
-				"Failed to enable MSI-X (err=%d)\n", err);
+		dev_err(&priv->pdev->dev,
+			"Failed to enable MSI-X (err=%d)\n", err);
 		return err;
 	}
 
Signature · 6 lines
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw
Quoted 2 lines · Bjorn Helgaas

I assume this is being handled by Matt and/or Alexandre (listed in MAINTAINERS). Let me know if I should do anything.

Hi Bjorn,

No worries, the patch is in Andrew's tree already.

Signature · 3 lines
Regards,
Alexander Gordeev
[email protected]