public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/pseries: Force 32 bit MSIs when tearing down
@ 2013-05-27 16:20 Alexander Gordeev
  2013-05-27 21:52 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Gordeev @ 2013-05-27 16:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Benjamin Herrenschmidt, Brian King

This fix just adds a missed call to a new PAPR function
which should have been done with commit e61133d ("powerpc/
pseries: Force 32 bit MSIs for devices that require it")

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
 arch/powerpc/platforms/pseries/msi.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 40c7db3..2b80a68 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -90,6 +90,7 @@ static int rtas_change_msi(struct pci_dn *pdn, u32 func, u32 num_irqs)
 static void rtas_disable_msi(struct pci_dev *pdev)
 {
 	struct pci_dn *pdn;
+	int rc;
 
 	pdn = get_pdn(pdev);
 	if (!pdn)
@@ -98,7 +99,12 @@ static void rtas_disable_msi(struct pci_dev *pdev)
 	/*
 	 * disabling MSI with the explicit interface also disables MSI-X
 	 */
-	if (rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, 0) != 0) {
+	if (pdn->force_32bit_msi)
+		rc = rtas_change_msi(pdn, RTAS_CHANGE_32MSI_FN, 0);
+	else
+		rc = rtas_change_msi(pdn, RTAS_CHANGE_MSI_FN, 0);
+
+	if ((rc != 0) && !pdn->force_32bit_msi) {
 		/* 
 		 * may have failed because explicit interface is not
 		 * present
-- 
1.7.7.6


-- 
Regards,
Alexander Gordeev
agordeev@redhat.com

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

end of thread, other threads:[~2013-05-29 21:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-27 16:20 [PATCH] powerpc/pseries: Force 32 bit MSIs when tearing down Alexander Gordeev
2013-05-27 21:52 ` Benjamin Herrenschmidt
2013-05-28  7:20   ` Alexander Gordeev
2013-05-28  7:29     ` Benjamin Herrenschmidt
2013-05-29 21:13   ` Brian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox