All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yhlu.kernel.send@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	David Miller <davem@davemloft.net>, Jeff Garzik <jeff@garzik.org>,
	Greg KH <greg@kroah.com>, Ingo Molnar <mingo@elte.hu>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
Subject: [PATCH] ixgb/e: fix IRQx nobody cared for shared irq with INTx
Date: Tue, 1 Apr 2008 17:20:03 -0700	[thread overview]
Message-ID: <200804011720.03569.yhlu.kernel@gmail.com> (raw)
In-Reply-To: <200803311458.56119.yhlu.kernel@gmail.com>

[PATCH] ixgb/e: fix IRQx nobody cared for shared irq with INTx

solve
	ixgb on pci-x and mptsas on pci-x. sometime mptsas get confused.

same to
	[PATCH] e1000: fix IRQx nobody cared for shared irq with INTx
	http://lkml.org/lkml/2008/3/29/103

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

Index: linux-2.6/drivers/net/ixgb/ixgb_main.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgb/ixgb_main.c
+++ linux-2.6/drivers/net/ixgb/ixgb_main.c
@@ -290,6 +290,11 @@ ixgb_up(struct ixgb_adapter *adapter)
 #endif
 	ixgb_irq_enable(adapter);
 
+	if (!adapter->have_msi) {
+		/* enable INTx if not using MSI */
+		pci_intx(adapter->pdev, 1);
+	}
+
 	return 0;
 }
 
@@ -368,6 +373,8 @@ ixgb_probe(struct pci_dev *pdev,
 	int i;
 	int err;
 
+	/* disable INTx at first */
+	pci_intx(pdev, 0);
 	if((err = pci_enable_device(pdev)))
 		return err;
 
Index: linux-2.6/drivers/net/ixgbe/ixgbe_main.c
===================================================================
--- linux-2.6.orig/drivers/net/ixgbe/ixgbe_main.c
+++ linux-2.6/drivers/net/ixgbe/ixgbe_main.c
@@ -1988,6 +1988,12 @@ try_intr_reinit:
 	if (err)
 		goto err_up;
 
+	if (!(adapter->flags &
+	      (IXGBE_FLAG_MSI_ENABLED | IXGBE_FLAG_MSIX_ENABLED))) {
+		/* enable INTx if not using MSI/MSIX */
+		pci_intx(adapter->pdev, 1);
+	}
+
 	return 0;
 
 err_up:
@@ -2627,6 +2633,8 @@ static int __devinit ixgbe_probe(struct 
 	u16 link_status, link_speed, link_width;
 	u32 part_num;
 
+	/* disable INTx at first */
+	pci_intx(pdev, 0);
 	err = pci_enable_device(pdev);
 	if (err)
 		return err;

      reply	other threads:[~2008-04-02  0:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-29 21:03 [PATCH] e1000: fix IRQx nobody cared for shared irq with INTx Yinghai Lu
2008-03-29 21:15 ` Jeff Garzik
2008-03-29 23:46   ` Yinghai Lu
2008-03-29 23:50   ` Yinghai Lu
2008-03-31 21:58 ` [PATCH] r8169: " Yinghai Lu
2008-04-02  0:20   ` Yinghai Lu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200804011720.03569.yhlu.kernel@gmail.com \
    --to=yhlu.kernel.send@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=greg@kroah.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.