]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: prevent link checks while resetting
authorEmil Tantilov <emil.s.tantilov@intel.com>
Sat, 27 Aug 2011 07:18:37 +0000 (07:18 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 14:12:14 +0000 (22:12 +0800)
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 <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/ixgbe/ixgbe_main.c

index 8026e1e1fddaed19277c19771d998dfff1474da3..abbfc61b9d3f8bc2da9306259f81fe4a968e48b8 100644 (file)
@@ -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);