]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Only clear adapter_stopped if ixgbe_setup_fc succeeded
authorMark Rustad <mark.d.rustad@intel.com>
Sat, 8 Aug 2015 23:27:46 +0000 (16:27 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 12 Oct 2015 16:05:03 +0000 (09:05 -0700)
Orabug: 21918732

A logic error here results in the adapter_stopped flag only being
cleared when ixgbe_setup_fc returns an error. Correct the logic.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 3507a9b8c9d1684b5095c97f587ee46184e590da)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

index b620d7a6631e9f4406907e46c06c6aae1c2aabbc..98e1ddde310404906c2bf78656bb84d34b903568 100644 (file)
@@ -297,13 +297,13 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)
 
        /* Setup flow control */
        ret_val = ixgbe_setup_fc(hw);
-       if (!ret_val)
-               return 0;
+       if (ret_val)
+               return ret_val;
 
        /* Clear adapter stopped flag */
        hw->adapter_stopped = false;
 
-       return ret_val;
+       return 0;
 }
 
 /**