From: Tushar Dave Date: Tue, 31 Jul 2012 02:02:43 +0000 (+0000) Subject: e1000e: NIC goes up and immediately goes down X-Git-Tag: firefly_0821_release~7541^2~797 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5a4cebe94b76a0182a8ebb97b665ff84e7427482;p=firefly-linux-kernel-4.4.55.git e1000e: NIC goes up and immediately goes down commit b7ec70be01a87f2c85df3ae11046e74f9b67e323 upstream. Found that commit d478eb44 was a bad commit. If the link partner is transmitting codeword (even if NULL codeword), then the RXCW.C bit will be set so check for RXCW.CW is unnecessary. Ref: RH BZ 840642 Reported-by: Fabio Futigami Signed-off-by: Tushar Dave CC: Marcelo Ricardo Leitner Tested-by: Aaron Brown Signed-off-by: Peter P Waskiewicz Jr Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index 5278e8456b68..0d0ee552d95c 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c @@ -1602,10 +1602,8 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw) * auto-negotiation in the TXCW register and disable * forced link in the Device Control register in an * attempt to auto-negotiate with our link partner. - * If the partner code word is null, stop forcing - * and restart auto negotiation. */ - if ((rxcw & E1000_RXCW_C) || !(rxcw & E1000_RXCW_CW)) { + if (rxcw & E1000_RXCW_C) { /* Enable autoneg, and unforce link up */ ew32(TXCW, mac->txcw); ew32(CTRL, (ctrl & ~E1000_CTRL_SLU));