From: Emil Tantilov Date: Sat, 27 Aug 2011 07:18:37 +0000 (+0000) Subject: ixgbe: prevent link checks while resetting X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~166 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=67e6d8623acc68b59dbc10bda5b3ae6dd3a71450;p=users%2Fjedix%2Flinux-maple.git ixgbe: prevent link checks while resetting It some situations the driver sets __IXGBE_RESETTING and then __IXGBE_DOWN flags. It is possible a link check may sneak in between. This patch adds check for both flags. The idea is to reduce register reads while the PHY is resetting. (cherry picked from commit 7edebf9a6aac07e2ebb3901b60672293a7139ad0) Signed-off-by: Emil Tantilov Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 8026e1e1fdda..abbfc61b9d3f 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -5977,7 +5977,8 @@ static void ixgbe_spoof_check(struct ixgbe_adapter *adapter) static void ixgbe_watchdog_subtask(struct ixgbe_adapter *adapter) { /* if interface is down do nothing */ - if (test_bit(__IXGBE_DOWN, &adapter->state)) + if (test_bit(__IXGBE_DOWN, &adapter->state) || + test_bit(__IXGBE_RESETTING, &adapter->state)) return; ixgbe_watchdog_update_link(adapter);