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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);
	}