Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier...
[cascardo/linux.git] / arch / powerpc / platforms / pseries / msi.c
index 1164c34..38d24e7 100644 (file)
@@ -93,8 +93,18 @@ static void rtas_disable_msi(struct pci_dev *pdev)
        if (!pdn)
                return;
 
-       if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0) != 0)
-               pr_debug("rtas_msi: Setting MSIs to 0 failed!\n");
+       /*
+        * disabling MSI with the explicit interface also disables MSI-X
+        */
+       if (rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, 0) != 0) {
+               /* 
+                * may have failed because explicit interface is not
+                * present
+                */
+               if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0) != 0) {
+                       pr_debug("rtas_msi: Setting MSIs to 0 failed!\n");
+               }
+       }
 }
 
 static int rtas_query_irq_number(struct pci_dn *pdn, int offset)
@@ -127,7 +137,7 @@ static void rtas_teardown_msi_irqs(struct pci_dev *pdev)
                if (entry->irq == NO_IRQ)
                        continue;
 
-               set_irq_msi(entry->irq, NULL);
+               irq_set_msi_desc(entry->irq, NULL);
                irq_dispose_mapping(entry->irq);
        }
 
@@ -427,7 +437,7 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
                }
 
                dev_dbg(&pdev->dev, "rtas_msi: allocated virq %d\n", virq);
-               set_irq_msi(virq, entry);
+               irq_set_msi_desc(virq, entry);
 
                /* Read config space back so we can restore after reset */
                read_msi_msg(virq, &msg);