From 19458bd425c0ee21bb35958c60d3682f9c42f274 Mon Sep 17 00:00:00 2001 From: Mark Rustad Date: Sat, 1 Mar 2014 05:21:00 +0000 Subject: [PATCH] ixgbe: Break recursion in case of removal 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 Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- 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 911b711b6ba1..24fba39e194e 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; -- 2.20.1