mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-24 14:29:38 +07:00
e1000e: Cleanup code logic in e1000_check_for_serdes_link_82571()
Cleanup code to make it more clean and readable. Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
141e369de6
commit
18115f82bc
@ -1677,16 +1677,18 @@ static s32 e1000_check_for_serdes_link_82571(struct e1000_hw *hw)
|
|||||||
e_dbg("ANYSTATE -> DOWN\n");
|
e_dbg("ANYSTATE -> DOWN\n");
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* Check several times, if Sync and Config
|
* Check several times, if SYNCH bit and CONFIG
|
||||||
* both are consistently 1 then simply ignore
|
* bit both are consistently 1 then simply ignore
|
||||||
* the Invalid bit and restart Autoneg
|
* the IV bit and restart Autoneg
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < AN_RETRY_COUNT; i++) {
|
for (i = 0; i < AN_RETRY_COUNT; i++) {
|
||||||
udelay(10);
|
udelay(10);
|
||||||
rxcw = er32(RXCW);
|
rxcw = er32(RXCW);
|
||||||
if ((rxcw & E1000_RXCW_IV) &&
|
if ((rxcw & E1000_RXCW_SYNCH) &&
|
||||||
!((rxcw & E1000_RXCW_SYNCH) &&
|
(rxcw & E1000_RXCW_C))
|
||||||
(rxcw & E1000_RXCW_C))) {
|
continue;
|
||||||
|
|
||||||
|
if (rxcw & E1000_RXCW_IV) {
|
||||||
mac->serdes_has_link = false;
|
mac->serdes_has_link = false;
|
||||||
mac->serdes_link_state =
|
mac->serdes_link_state =
|
||||||
e1000_serdes_link_down;
|
e1000_serdes_link_down;
|
||||||
|
Loading…
Reference in New Issue
Block a user