netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mark Rustad <mark.d.rustad@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 05/16] ixgbe: Break recursion in case of removal
Date: Fri, 21 Mar 2014 05:09:55 -0700	[thread overview]
Message-ID: <1395403806-29302-6-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1395403806-29302-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Mark Rustad <mark.d.rustad@intel.com>

When an adapter is removed and registers all read as all one's,
an infinite recursion can happen between ixgbe_clear_vmdq_generic
and ixgbe_clear_rar_generic. Adding a check for removal breaks
this recursion.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 911b711..24fba39 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -2913,6 +2913,9 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
 	mpsar_lo = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
 	mpsar_hi = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
 
+	if (ixgbe_removed(hw->hw_addr))
+		goto done;
+
 	if (!mpsar_lo && !mpsar_hi)
 		goto done;
 
-- 
1.8.3.1

  parent reply	other threads:[~2014-03-21 12:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-21 12:09 [net-next 00/16][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-03-21 12:09 ` [net-next 01/16] i40e/i40evf: Add EEE LPI stats Jeff Kirsher
2014-03-21 12:09 ` [net-next 02/16] i40e: Fix a message string Jeff Kirsher
2014-03-21 12:09 ` [net-next 03/16] i40evf: don't shut down admin queue on error Jeff Kirsher
2014-03-21 12:09 ` [net-next 04/16] i40evf: clean up init error messages Jeff Kirsher
2014-03-21 12:09 ` Jeff Kirsher [this message]
2014-03-21 12:09 ` [net-next 06/16] ixgbevf: Use static inlines instead of macros Jeff Kirsher
2014-03-21 12:09 ` [net-next 07/16] ixgbevf: Make the ethtool register test use accessors Jeff Kirsher
2014-03-21 12:09 ` [net-next 08/16] ixgbevf: Check register reads for adapter removal Jeff Kirsher
2014-03-21 12:09 ` [net-next 09/16] ixgbevf: Check for adapter removal on register writes Jeff Kirsher
2014-03-21 12:10 ` [net-next 10/16] ixgbevf: Additional adapter removal checks Jeff Kirsher
2014-03-21 12:10 ` [net-next 11/16] igb: implement SIOCGHWTSTAMP ioctl Jeff Kirsher
2014-03-21 12:10 ` [net-next 12/16] igb: add register rd/wr for surprise removal Jeff Kirsher
2014-03-21 12:10 ` [net-next 13/16] igb: Fix memory leak in igb_get_module_eeprom() Jeff Kirsher
2014-03-21 12:10 ` [net-next 14/16] igb: specify phc_index of 82575 for get_ts_info Jeff Kirsher
2014-03-21 12:10 ` [net-next 15/16] igb: Fix Null-pointer dereference in igb_reset_q_vector Jeff Kirsher
2014-03-21 12:10 ` [net-next 16/16] igb: Unset IGB_FLAG_HAS_MSIX-flag when falling back to msi-only Jeff Kirsher
2014-03-21 19:24 ` [net-next 00/16][pull request] Intel Wired LAN Driver Updates David Miller
     [not found] ` <0082c389c1d6488cb5cf473ff1bc26e2@UCL-MBX03.OASIS.UCLOUVAIN.BE>
2014-03-23 14:31   ` [net-next 15/16] igb: Fix Null-pointer dereference in igb_reset_q_vector Christoph Paasch
2014-03-24 20:49     ` Jeff Kirsher
     [not found]     ` <6af5c43984d241daa37714ea8f98ab53@UCL-MBX03.OASIS.UCLOUVAIN.BE>
2014-03-24 20:57       ` Christoph Paasch
     [not found] ` <3ed2b36cb601493fae970917602ab6d1@UCL-MBX03.OASIS.UCLOUVAIN.BE>
2014-03-23 14:32   ` [net-next 16/16] igb: Unset IGB_FLAG_HAS_MSIX-flag when falling back to msi-only Christoph Paasch
2014-03-24 20:51     ` Jeff Kirsher

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=1395403806-29302-6-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=mark.d.rustad@intel.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).