linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc: disable MSI using new interface if possible
@ 2011-03-03 19:39 Nishanth Aravamudan
  2011-03-03 19:39 ` [PATCH 2/2] powerpc/msi: clarify call to check_req_msi{,x} Nishanth Aravamudan
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Nishanth Aravamudan @ 2011-03-03 19:39 UTC (permalink / raw)
  To: linuxppc-dev

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>
Cc: Milton Miller <miltonm@bga.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
---

This is effectively a PCI quirk, but I'm not sure how to do a
architecture-specific quirk (looking through the code now). If anyone
has any pointers, I'd appreciate it!

 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 1164c34..9434576 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)
 	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 due to lacking
+		 * "ibm,change-msix-capable" property
+		 */
+		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)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-03-10  7:04 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-03 19:39 [PATCH 1/2] powerpc: disable MSI using new interface if possible Nishanth Aravamudan
2011-03-03 19:39 ` [PATCH 2/2] powerpc/msi: clarify call to check_req_msi{,x} Nishanth Aravamudan
2011-03-03 19:44 ` [PATCH 1/2] powerpc: disable MSI using new interface if possible Nishanth Aravamudan
2011-03-04  1:05 ` Michael Ellerman
2011-03-04  1:41   ` [PATCH] " Nishanth Aravamudan
2011-03-04  3:01     ` Michael Ellerman
2011-03-04  7:24       ` Nishanth Aravamudan
2011-03-08  5:34         ` Nishanth Aravamudan
2011-03-09 22:54           ` Michael Ellerman
2011-03-04  3:06     ` Michael Ellerman
2011-03-04  3:29       ` Joe Perches
2011-03-04 11:13         ` Florian Mickler
2011-03-09 23:12         ` Michael Ellerman
2011-03-10  0:28           ` Joe Perches
2011-03-10  0:46             ` Nishanth Aravamudan
2011-03-10  3:35             ` Michael Ellerman
2011-03-10  3:45               ` Joe Perches
2011-03-10  7:04                 ` Florian Mickler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).