ixgbe: Break recursion in case of removal
authorMark Rustad <mark.d.rustad@intel.com>
Sat, 1 Mar 2014 05:21:00 +0000 (05:21 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 21 Mar 2014 08:46:03 +0000 (01:46 -0700)
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

index 911b711b6ba1423459c70cfb5189b21a0030d114..24fba39e194e682640391e42e5e618907ff230d9 100644 (file)
@@ -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;