提交 72279093 编写于 作者: A Alexander Duyck 提交者: David S. Miller

igbvf: avoid reset storms due to mailbox issues

From: Alexander Duyck <alexander.h.duyck@intel.com>

This change makes it so that reset/interrupt storms can be avoided when
there are mailbox issues.  The new behavior is to only allow the device to
trigger mailbox related resets only once every 10 seconds.
Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fef45f4c
......@@ -276,6 +276,7 @@ struct igbvf_adapter {
unsigned long led_status;
unsigned int flags;
unsigned long last_reset;
};
struct igbvf_info {
......
......@@ -1469,6 +1469,8 @@ static void igbvf_reset(struct igbvf_adapter *adapter)
memcpy(netdev->perm_addr, adapter->hw.mac.addr,
netdev->addr_len);
}
adapter->last_reset = jiffies;
}
int igbvf_up(struct igbvf_adapter *adapter)
......@@ -1812,11 +1814,15 @@ static bool igbvf_has_link(struct igbvf_adapter *adapter)
s32 ret_val = E1000_SUCCESS;
bool link_active;
/* If interface is down, stay link down */
if (test_bit(__IGBVF_DOWN, &adapter->state))
return false;
ret_val = hw->mac.ops.check_for_link(hw);
link_active = !hw->mac.get_link_status;
/* if check for link returns error we will need to reset */
if (ret_val)
if (ret_val && time_after(jiffies, adapter->last_reset + (10 * HZ)))
schedule_work(&adapter->reset_task);
return link_active;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册