diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2020-03-20 10:53:36 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-23 21:01:58 -0700 |
commit | e1eab7dfa6f3445ee1b1b0e6b7f029437de19ea5 (patch) | |
tree | 18fff9365a2001331b3eff5937246c27d3de4e0e /drivers/net/phy/mdio-xpcs.c | |
parent | aaf99e8d560c9cdeb6b1aa29257835216b58e746 (diff) | |
download | linux-e1eab7dfa6f3445ee1b1b0e6b7f029437de19ea5.tar.bz2 |
net: phy: xpcs: Set Link down if AutoNeg is enabled and did not finish
Set XPCS Link as down when AutoNeg is enabled but it didn't finish with
success.
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/mdio-xpcs.c')
-rw-r--r-- | drivers/net/phy/mdio-xpcs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio-xpcs.c b/drivers/net/phy/mdio-xpcs.c index 54976047dcb9..f10d86b85fbd 100644 --- a/drivers/net/phy/mdio-xpcs.c +++ b/drivers/net/phy/mdio-xpcs.c @@ -617,10 +617,12 @@ static int xpcs_get_state(struct mdio_xpcs_args *xpcs, return xpcs_config(xpcs, state); } - if (state->link && state->an_enabled && xpcs_aneg_done(xpcs, state)) { + if (state->an_enabled && xpcs_aneg_done(xpcs, state)) { state->an_complete = true; xpcs_read_lpa(xpcs, state); xpcs_resolve_lpa(xpcs, state); + } else if (state->an_enabled) { + state->link = 0; } else if (state->link) { xpcs_resolve_pma(xpcs, state); } |