netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 09/12] igb: Fix possible panic caused by Rx traffic arrival while interface is down
Date: Tue, 21 May 2013 15:03:17 -0700	[thread overview]
Message-ID: <1369173800-20326-10-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1369173800-20326-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Carolyn Wyborny <carolyn.wyborny@intel.com>

This patch reorders disabling napi and irqs during igb_down.
This is done to avoid possible panic's found in other Intel drivers
when Rx traffic arrives while interface is going down.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 2c8f7e0..6a0c1b6 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1667,10 +1667,13 @@ void igb_down(struct igb_adapter *adapter)
 	wrfl();
 	msleep(10);
 
-	for (i = 0; i < adapter->num_q_vectors; i++)
+	igb_irq_disable(adapter);
+
+	for (i = 0; i < adapter->num_q_vectors; i++) {
+		napi_synchronize(&(adapter->q_vector[i]->napi));
 		napi_disable(&(adapter->q_vector[i]->napi));
+	}
 
-	igb_irq_disable(adapter);
 
 	del_timer_sync(&adapter->watchdog_timer);
 	del_timer_sync(&adapter->phy_info_timer);
-- 
1.7.11.7

  parent reply	other threads:[~2013-05-21 22:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21 22:03 [net-next 00/12][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-05-21 22:03 ` [net-next 01/12] e1000e: cleanup whitespace Jeff Kirsher
2013-05-21 22:03 ` [net-next 02/12] e1000e: prevent warning from -Wunused-parameter Jeff Kirsher
2013-05-21 22:03 ` [net-next 03/12] e1000e: Release mutex lock only if it has been initially acquired Jeff Kirsher
2013-05-21 22:03 ` [net-next 04/12] igb: Changed LEDs blink mechanism to include designs using cathode Jeff Kirsher
2013-05-21 22:03 ` [net-next 05/12] igb: Add update to last_rx_timestamp in Rx rings Jeff Kirsher
2013-05-21 22:03 ` [net-next 06/12] igb: Support for SFP modules discovery Jeff Kirsher
2013-05-21 22:03 ` [net-next 07/12] igb: SerDes flow control setting Jeff Kirsher
2013-05-21 22:03 ` [net-next 08/12] igb: Fix set_ethtool function to call update nvm for entire image Jeff Kirsher
2013-05-21 22:03 ` Jeff Kirsher [this message]
2013-05-21 22:03 ` [net-next 10/12] igb: Implementation of i210/i211 LED support Jeff Kirsher
2013-05-21 22:03 ` [net-next 11/12] igb: Removed unused i2c function Jeff Kirsher
2013-05-21 22:03 ` [net-next 12/12] IXGBE: Set the SW prio_tc values at initialization to the HW setting Jeff Kirsher
2013-05-22 20:57 ` [net-next 00/12][pull request] Intel Wired LAN Driver Updates David Miller

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=1369173800-20326-10-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=carolyn.wyborny@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.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 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).