Commit d12284de authored by Tushar Dave's avatar Tushar Dave Committed by Ben Hutchings

e1000e: NIC goes up and immediately goes down

commit b7ec70be 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: default avatarFabio Futigami <ffutigam@redhat.com>
Signed-off-by: default avatarTushar Dave <tushar.n.dave@intel.com>
CC: Marcelo Ricardo Leitner <mleitner@redhat.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 074007af
...@@ -1600,10 +1600,8 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw) ...@@ -1600,10 +1600,8 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
* auto-negotiation in the TXCW register and disable * auto-negotiation in the TXCW register and disable
* forced link in the Device Control register in an * forced link in the Device Control register in an
* attempt to auto-negotiate with our link partner. * 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 */ /* Enable autoneg, and unforce link up */
ew32(TXCW, mac->txcw); ew32(TXCW, mac->txcw);
ew32(CTRL, (ctrl & ~E1000_CTRL_SLU)); ew32(CTRL, (ctrl & ~E1000_CTRL_SLU));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment