* [PATCH] PCI: Fix regression in powerpc MSI-X
@ 2009-11-04 15:03 Andre Detsch
2009-11-05 1:17 ` Michael Ellerman
2009-11-05 5:43 ` Benjamin Herrenschmidt
0 siblings, 2 replies; 4+ messages in thread
From: Andre Detsch @ 2009-11-04 15:03 UTC (permalink / raw)
To: linuxppc-dev, michael
Patch f598282f5145036312d90875d0ed5c14b49fd8a7 exposed a problem in
powerpc MSI-X functionality, making network interfaces such as ixgbe
and cxgb3 stop to work when MSI-X is enabled. RX interrupts were not
being generated.
The problem was caused because MSI irq was not being effectively
unmasked after device initialization.
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Index: linux-2.6/arch/powerpc/platforms/pseries/msi.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pseries/msi.c 2009-11-04
06:35:39.000000000 -0700
+++ linux-2.6/arch/powerpc/platforms/pseries/msi.c 2009-11-04
07:23:27.000000000 -0700
@@ -432,8 +432,6 @@ static int rtas_setup_msi_irqs(struct pc
/* Read config space back so we can restore after reset */
read_msi_msg(virq, &msg);
entry->msg = msg;
-
- unmask_msi_irq(virq);
}
return 0;
Index: linux-2.6/arch/powerpc/platforms/pseries/xics.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pseries/xics.c 2009-11-04
06:35:39.000000000 -0700
+++ linux-2.6/arch/powerpc/platforms/pseries/xics.c 2009-11-04
07:23:27.000000000 -0700
@@ -18,6 +18,7 @@
#include <linux/init.h>
#include <linux/radix-tree.h>
#include <linux/cpu.h>
+#include <linux/msi.h>
#include <linux/of.h>
#include <asm/firmware.h>
@@ -219,6 +220,14 @@ static void xics_unmask_irq(unsigned int
static unsigned int xics_startup(unsigned int virq)
{
+ /*
+ * The generic MSI code returns with the interrupt disabled on the
+ * card, using the MSI mask bits. Firmware doesn't appear to unmask
+ * at that level, so we do it here by hand.
+ */
+ if (irq_to_desc(virq)->msi_desc)
+ unmask_msi_irq(virq);
+
/* unmask it */
xics_unmask_irq(virq);
return 0;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: Fix regression in powerpc MSI-X
2009-11-04 15:03 [PATCH] PCI: Fix regression in powerpc MSI-X Andre Detsch
@ 2009-11-05 1:17 ` Michael Ellerman
2009-11-05 5:43 ` Benjamin Herrenschmidt
1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2009-11-05 1:17 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Andre Detsch, linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
On Wed, 2009-11-04 at 13:03 -0200, Andre Detsch wrote:
> Patch f598282f5145036312d90875d0ed5c14b49fd8a7 exposed a problem in
> powerpc MSI-X functionality, making network interfaces such as ixgbe
> and cxgb3 stop to work when MSI-X is enabled. RX interrupts were not
> being generated.
Which means we'd like it in 32 please Ben.
Also Andre, once Ben has merged this you should forward it to
stable@kernel.org for the 31 stable series.
cheers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: Fix regression in powerpc MSI-X
2009-11-04 15:03 [PATCH] PCI: Fix regression in powerpc MSI-X Andre Detsch
2009-11-05 1:17 ` Michael Ellerman
@ 2009-11-05 5:43 ` Benjamin Herrenschmidt
2009-11-05 12:04 ` Andre Detsch
1 sibling, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2009-11-05 5:43 UTC (permalink / raw)
To: Andre Detsch; +Cc: linuxppc-dev
On Wed, 2009-11-04 at 13:03 -0200, Andre Detsch wrote:
> Patch f598282f5145036312d90875d0ed5c14b49fd8a7 exposed a problem in
> powerpc MSI-X functionality, making network interfaces such as ixgbe
> and cxgb3 stop to work when MSI-X is enabled. RX interrupts were not
> being generated.
>
> The problem was caused because MSI irq was not being effectively
> unmasked after device initialization.
Patch is wrapped...
Ben.
> Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
>
> Index: linux-2.6/arch/powerpc/platforms/pseries/msi.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/pseries/msi.c 2009-11-04
> 06:35:39.000000000 -0700
> +++ linux-2.6/arch/powerpc/platforms/pseries/msi.c 2009-11-04
> 07:23:27.000000000 -0700
> @@ -432,8 +432,6 @@ static int rtas_setup_msi_irqs(struct pc
> /* Read config space back so we can restore after reset */
> read_msi_msg(virq, &msg);
> entry->msg = msg;
> -
> - unmask_msi_irq(virq);
> }
>
> return 0;
> Index: linux-2.6/arch/powerpc/platforms/pseries/xics.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/pseries/xics.c 2009-11-04
> 06:35:39.000000000 -0700
> +++ linux-2.6/arch/powerpc/platforms/pseries/xics.c 2009-11-04
> 07:23:27.000000000 -0700
> @@ -18,6 +18,7 @@
> #include <linux/init.h>
> #include <linux/radix-tree.h>
> #include <linux/cpu.h>
> +#include <linux/msi.h>
> #include <linux/of.h>
>
> #include <asm/firmware.h>
> @@ -219,6 +220,14 @@ static void xics_unmask_irq(unsigned int
>
> static unsigned int xics_startup(unsigned int virq)
> {
> + /*
> + * The generic MSI code returns with the interrupt disabled on the
> + * card, using the MSI mask bits. Firmware doesn't appear to unmask
> + * at that level, so we do it here by hand.
> + */
> + if (irq_to_desc(virq)->msi_desc)
> + unmask_msi_irq(virq);
> +
> /* unmask it */
> xics_unmask_irq(virq);
> return 0;
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] PCI: Fix regression in powerpc MSI-X
2009-11-05 5:43 ` Benjamin Herrenschmidt
@ 2009-11-05 12:04 ` Andre Detsch
0 siblings, 0 replies; 4+ messages in thread
From: Andre Detsch @ 2009-11-05 12:04 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
Patch f598282f5145036312d90875d0ed5c14b49fd8a7 exposed a problem in
powerpc MSI-X functionality, making network interfaces such as ixgbe
and cxgb3 stop to work when MSI-X is enabled. RX interrupts were not
being generated.
The problem was caused because MSI irq was not being effectively
unmasked after device initialization.
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Index: linux-2.6/arch/powerpc/platforms/pseries/msi.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pseries/msi.c 2009-11-04 06:35:39.000000000 -0700
+++ linux-2.6/arch/powerpc/platforms/pseries/msi.c 2009-11-04 07:23:27.000000000 -0700
@@ -432,8 +432,6 @@ static int rtas_setup_msi_irqs(struct pc
/* Read config space back so we can restore after reset */
read_msi_msg(virq, &msg);
entry->msg = msg;
-
- unmask_msi_irq(virq);
}
return 0;
Index: linux-2.6/arch/powerpc/platforms/pseries/xics.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pseries/xics.c 2009-11-04 06:35:39.000000000 -0700
+++ linux-2.6/arch/powerpc/platforms/pseries/xics.c 2009-11-04 07:23:27.000000000 -0700
@@ -18,6 +18,7 @@
#include <linux/init.h>
#include <linux/radix-tree.h>
#include <linux/cpu.h>
+#include <linux/msi.h>
#include <linux/of.h>
#include <asm/firmware.h>
@@ -219,6 +220,14 @@ static void xics_unmask_irq(unsigned int
static unsigned int xics_startup(unsigned int virq)
{
+ /*
+ * The generic MSI code returns with the interrupt disabled on the
+ * card, using the MSI mask bits. Firmware doesn't appear to unmask
+ * at that level, so we do it here by hand.
+ */
+ if (irq_to_desc(virq)->msi_desc)
+ unmask_msi_irq(virq);
+
/* unmask it */
xics_unmask_irq(virq);
return 0;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-05 12:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-04 15:03 [PATCH] PCI: Fix regression in powerpc MSI-X Andre Detsch
2009-11-05 1:17 ` Michael Ellerman
2009-11-05 5:43 ` Benjamin Herrenschmidt
2009-11-05 12:04 ` Andre Detsch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.