From: Bruce Allan Date: Wed, 24 Nov 2010 06:01:20 +0000 (+0000) Subject: e1000e: 82571-based mezzanine card can fail ethtool link test X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a82a14f4cdcfedb27eacec8eb4d9e47d42c10d43;p=openwrt%2Fstaging%2Fblogic.git e1000e: 82571-based mezzanine card can fail ethtool link test On certain 82571-based mezzanine NICs in some blade servers, the ethtool link test can fail due to the serdes_has_link flag not set correctly. Signed-off-by: Bruce Allan Tested-by: Emil Tantilov Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index 9333921010cc..6942e2f86eac 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c @@ -1523,8 +1523,10 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw) e1000_serdes_link_autoneg_progress; mac->serdes_has_link = false; e_dbg("AN_UP -> AN_PROG\n"); + } else { + mac->serdes_has_link = true; } - break; + break; case e1000_serdes_link_forced_up: /* @@ -1543,6 +1545,8 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw) e1000_serdes_link_autoneg_progress; mac->serdes_has_link = false; e_dbg("FORCED_UP -> AN_PROG\n"); + } else { + mac->serdes_has_link = true; } break; @@ -1598,6 +1602,7 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw) ew32(CTRL, (ctrl & ~E1000_CTRL_SLU)); mac->serdes_link_state = e1000_serdes_link_autoneg_progress; + mac->serdes_has_link = false; e_dbg("DOWN -> AN_PROG\n"); break; }