From: Emil Tantilov Date: Sat, 27 Aug 2011 07:18:37 +0000 (+0000) Subject: ixgbe: prevent link checks while resetting X-Git-Tag: MMI-PSA29.97-13-9~18194^2~156 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7edebf9a6aac07e2ebb3901b60672293a7139ad0;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.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. Signed-off-by: Emil Tantilov Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 9cd44adcea14..ed922726daab 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -5978,7 +5978,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);