Commit e1eab7df authored by Jose Abreu's avatar Jose Abreu Committed by David S. Miller

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: default avatarJose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aaf99e8d
......@@ -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);
}
......
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