提交 07914ee3 编写于 作者: B Bruce Allan 提交者: Jeff Kirsher

e1000e: use true/false for bool autoneg_false

v2 - replaced mac->autoneg_failed == false with !mac->autoneg_failed
Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
Tested-by: NAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 668018d7
...@@ -513,8 +513,8 @@ s32 e1000e_check_for_fiber_link(struct e1000_hw *hw) ...@@ -513,8 +513,8 @@ s32 e1000e_check_for_fiber_link(struct e1000_hw *hw)
/* (ctrl & E1000_CTRL_SWDPIN1) == 1 == have signal */ /* (ctrl & E1000_CTRL_SWDPIN1) == 1 == have signal */
if ((ctrl & E1000_CTRL_SWDPIN1) && !(status & E1000_STATUS_LU) && if ((ctrl & E1000_CTRL_SWDPIN1) && !(status & E1000_STATUS_LU) &&
!(rxcw & E1000_RXCW_C)) { !(rxcw & E1000_RXCW_C)) {
if (mac->autoneg_failed == 0) { if (!mac->autoneg_failed) {
mac->autoneg_failed = 1; mac->autoneg_failed = true;
return 0; return 0;
} }
e_dbg("NOT Rx'ing /C/, disable AutoNeg and force link.\n"); e_dbg("NOT Rx'ing /C/, disable AutoNeg and force link.\n");
...@@ -578,8 +578,8 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw) ...@@ -578,8 +578,8 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw)
*/ */
/* (ctrl & E1000_CTRL_SWDPIN1) == 1 == have signal */ /* (ctrl & E1000_CTRL_SWDPIN1) == 1 == have signal */
if (!(status & E1000_STATUS_LU) && !(rxcw & E1000_RXCW_C)) { if (!(status & E1000_STATUS_LU) && !(rxcw & E1000_RXCW_C)) {
if (mac->autoneg_failed == 0) { if (!mac->autoneg_failed) {
mac->autoneg_failed = 1; mac->autoneg_failed = true;
return 0; return 0;
} }
e_dbg("NOT Rx'ing /C/, disable AutoNeg and force link.\n"); e_dbg("NOT Rx'ing /C/, disable AutoNeg and force link.\n");
...@@ -855,7 +855,7 @@ static s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw) ...@@ -855,7 +855,7 @@ static s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw)
} }
if (i == FIBER_LINK_UP_LIMIT) { if (i == FIBER_LINK_UP_LIMIT) {
e_dbg("Never got a valid link from auto-neg!!!\n"); e_dbg("Never got a valid link from auto-neg!!!\n");
mac->autoneg_failed = 1; mac->autoneg_failed = true;
/* /*
* AutoNeg failed to achieve a link, so we'll call * AutoNeg failed to achieve a link, so we'll call
* mac->check_for_link. This routine will force the * mac->check_for_link. This routine will force the
...@@ -867,9 +867,9 @@ static s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw) ...@@ -867,9 +867,9 @@ static s32 e1000_poll_fiber_serdes_link_generic(struct e1000_hw *hw)
e_dbg("Error while checking for link\n"); e_dbg("Error while checking for link\n");
return ret_val; return ret_val;
} }
mac->autoneg_failed = 0; mac->autoneg_failed = false;
} else { } else {
mac->autoneg_failed = 0; mac->autoneg_failed = false;
e_dbg("Valid Link Found\n"); e_dbg("Valid Link Found\n");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册