Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121978
b: refs/heads/master
c: 63dcf3d
h: refs/heads/master
v: v3
  • Loading branch information
Bruce Allan authored and David S. Miller committed Nov 22, 2008
1 parent f258c19 commit 8d6cfdf
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5aa49c82118d2aa08c6cfaba01fd86f969b3f1d7
refs/heads/master: 63dcf3d353f32ca7007bfa53a9384f3283076afc
34 changes: 28 additions & 6 deletions trunk/drivers/net/e1000e/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,20 +575,42 @@ s32 e1000e_check_for_serdes_link(struct e1000_hw *hw)
*/
/* SYNCH bit and IV bit are sticky. */
udelay(10);
if (E1000_RXCW_SYNCH & er32(RXCW)) {
rxcw = er32(RXCW);
if (rxcw & E1000_RXCW_SYNCH) {
if (!(rxcw & E1000_RXCW_IV)) {
mac->serdes_has_link = 1;
hw_dbg(hw, "SERDES: Link is up.\n");
mac->serdes_has_link = true;
hw_dbg(hw, "SERDES: Link up - forced.\n");
}
} else {
mac->serdes_has_link = 0;
hw_dbg(hw, "SERDES: Link is down.\n");
mac->serdes_has_link = false;
hw_dbg(hw, "SERDES: Link down - force failed.\n");
}
}

if (E1000_TXCW_ANE & er32(TXCW)) {
status = er32(STATUS);
mac->serdes_has_link = (status & E1000_STATUS_LU);
if (status & E1000_STATUS_LU) {
/* SYNCH bit and IV bit are sticky, so reread rxcw. */
udelay(10);
rxcw = er32(RXCW);
if (rxcw & E1000_RXCW_SYNCH) {
if (!(rxcw & E1000_RXCW_IV)) {
mac->serdes_has_link = true;
hw_dbg(hw, "SERDES: Link up - autoneg "
"completed sucessfully.\n");
} else {
mac->serdes_has_link = false;
hw_dbg(hw, "SERDES: Link down - invalid"
"codewords detected in autoneg.\n");
}
} else {
mac->serdes_has_link = false;
hw_dbg(hw, "SERDES: Link down - no sync.\n");
}
} else {
mac->serdes_has_link = false;
hw_dbg(hw, "SERDES: Link down - autoneg failed\n");
}
}

return 0;
Expand Down

0 comments on commit 8d6cfdf

Please sign in to comment.