Patchwork e1000e: Fix irq_synchronize in MSI-X case

login
register
mail settings
Submitter Jean Delvare
Date July 20, 2010, 3:12 p.m.
Message ID <201007201712.05671.jdelvare@suse.de>
Download mbox | patch
Permalink /patch/59318/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Jean Delvare - July 20, 2010, 3:12 p.m.
Synchronize all IRQs when in MSI-X IRQ mode.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Bruce Allan <bruce.w.allan@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
---
I sent this patch to the e1000-devel list on June 8th, 2010, but
didn't receive any answer:
http://sourceforge.net/mailarchive/forum.php?thread_name=201006081818.59098.jdelvare%40suse.de&forum_name=e1000-devel

I don't know how critical synchronize_irq() is, so I don't know if
this patch should go to stable branches or not.

 drivers/net/e1000e/netdev.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Jeff Kirsher - July 21, 2010, 8:38 p.m.
On Tue, Jul 20, 2010 at 08:12, Jean Delvare <jdelvare@suse.de> wrote:
> Synchronize all IRQs when in MSI-X IRQ mode.
>
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Bruce Allan <bruce.w.allan@intel.com>
> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
> ---
> I sent this patch to the e1000-devel list on June 8th, 2010, but
> didn't receive any answer:
> http://sourceforge.net/mailarchive/forum.php?thread_name=201006081818.59098.jdelvare%40suse.de&forum_name=e1000-devel
>
> I don't know how critical synchronize_irq() is, so I don't know if
> this patch should go to stable branches or not.
>
>  drivers/net/e1000e/netdev.c |    8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> --- a/drivers/net/e1000e/netdev.c
> +++ b/drivers/net/e1000e/netdev.c
> @@ -1939,7 +1939,13 @@ static void e1000_irq_disable(struct e10
>        if (adapter->msix_entries)
>                ew32(EIAC_82574, 0);
>        e1e_flush();
> -       synchronize_irq(adapter->pdev->irq);
> +
> +       if (adapter->msix_entries) {
> +               synchronize_irq(adapter->msix_entries[0].vector);
> +               synchronize_irq(adapter->msix_entries[1].vector);
> +               synchronize_irq(adapter->msix_entries[2].vector);
> +       } else
> +               synchronize_irq(adapter->pdev->irq);
>  }
>
>  /**
>
> --
> Jean Delvare
> Suse L3

Thanks, I have added the patch to my queue.

Patch

--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -1939,7 +1939,13 @@  static void e1000_irq_disable(struct e10
 	if (adapter->msix_entries)
 		ew32(EIAC_82574, 0);
 	e1e_flush();
-	synchronize_irq(adapter->pdev->irq);
+
+	if (adapter->msix_entries) {
+		synchronize_irq(adapter->msix_entries[0].vector);
+		synchronize_irq(adapter->msix_entries[1].vector);
+		synchronize_irq(adapter->msix_entries[2].vector);
+	} else
+		synchronize_irq(adapter->pdev->irq);
 }
 
 /**