Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d478eb44 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher
Browse files

e1000e: 82571 SerDes link handle null code word from partner



SerDes Link detection on certain 82571 mezzanine cards can fail when the
link is forced, the link partner does not recognize forced link and the
link partner sends null code words.  Detect the null code words and return
to auto-negotiation state which causes the link partner to begin responding
with valid code words.  Within a reasonable interval the link will finally
settle as forced by both partners.

Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent b1d670f1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1431,8 +1431,10 @@ 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) {
			if ((rxcw & E1000_RXCW_C) || !(rxcw & E1000_RXCW_CW))  {
				/* Enable autoneg, and unforce link up */
				ew32(TXCW, mac->txcw);
				ew32(CTRL, (ctrl & ~E1000_CTRL_SLU));
+1 −0
Original line number Diff line number Diff line
@@ -516,6 +516,7 @@
#define E1000_TXCW_ANE        0x80000000        /* Auto-neg enable */

/* Receive Configuration Word */
#define E1000_RXCW_CW         0x0000ffff        /* RxConfigWord mask */
#define E1000_RXCW_IV         0x08000000        /* Receive config invalid */
#define E1000_RXCW_C          0x20000000        /* Receive config */
#define E1000_RXCW_SYNCH      0x40000000        /* Receive config synch */