diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2011-03-03 10:41:02 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-03-10 22:18:24 -0500 |
commit | 964a29962c278ddff8a199f23d7c9ef35152a0fe (patch) | |
tree | c9bcd5e09766ffb9ca043cea110a9e0ae5e735d7 /arch/powerpc/platforms/pseries | |
parent | 17b9f9e2653a2eae3b7e1bb8a1f7f80f6edc3fe3 (diff) |
powerpc/pseries: Disable MSI using new interface if possible
On upcoming hardware, we have a PCI adapter with two functions, one of
which uses MSI and the other uses MSI-X. This adapter, when MSI is
disabled using the "old" firmware interface (RTAS_CHANGE_FN), still
signals an MSI-X interrupt and triggers an EEH. We are working with the
vendor to ensure that the hardware is not at fault, but if we use the
"new" interface (RTAS_CHANGE_MSI_FN) to disable MSI, we also
automatically disable MSI-X and the adapter does not appear to signal
any stray MSI-X interrupt.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r-- | arch/powerpc/platforms/pseries/msi.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c index 1164c3430f2c..18ac801f8e90 100644 --- a/arch/powerpc/platforms/pseries/msi.c +++ b/arch/powerpc/platforms/pseries/msi.c | |||
@@ -93,8 +93,18 @@ static void rtas_disable_msi(struct pci_dev *pdev) | |||
93 | if (!pdn) | 93 | if (!pdn) |
94 | return; | 94 | return; |
95 | 95 | ||
96 | if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0) != 0) | 96 | /* |
97 | pr_debug("rtas_msi: Setting MSIs to 0 failed!\n"); | 97 | * disabling MSI with the explicit interface also disables MSI-X |
98 | */ | ||
99 | if (rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, 0) != 0) { | ||
100 | /* | ||
101 | * may have failed because explicit interface is not | ||
102 | * present | ||
103 | */ | ||
104 | if (rtas_change_msi(pdn, RTAS_CHANGE_FN, 0) != 0) { | ||
105 | pr_debug("rtas_msi: Setting MSIs to 0 failed!\n"); | ||
106 | } | ||
107 | } | ||
98 | } | 108 | } |
99 | 109 | ||
100 | static int rtas_query_irq_number(struct pci_dn *pdn, int offset) | 110 | static int rtas_query_irq_number(struct pci_dn *pdn, int offset) |