Patchwork [1/4] powerpc/pseries: Fix MSI-X interrupt querying

login
register
mail settings
Submitter Michael Ellerman
Date Jan. 23, 2009, 6:54 a.m.
Message ID <1859474fb4aabec9224df5ea2263180d504913fd.1232693349.git.michael@ellerman.id.au>
Download mbox | patch
Permalink /patch/20017/
State Accepted
Commit e27ed698b88b3387d326e84c0bbe9f83e19c747b
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Michael Ellerman - Jan. 23, 2009, 6:54 a.m.
We need to increment i in the loop that queries what interrupts firmware
gave us, otherwise we'll incorrectly use the first value over and over.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/platforms/pseries/msi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index f15222b..4af7aa3 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -199,7 +199,7 @@  static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
 
 	i = 0;
 	list_for_each_entry(entry, &pdev->msi_list, list) {
-		hwirq = rtas_query_irq_number(pdn, i);
+		hwirq = rtas_query_irq_number(pdn, i++);
 		if (hwirq < 0) {
 			pr_debug("rtas_msi: error (%d) getting hwirq\n", rc);
 			return hwirq;