mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
aaf99e8d56
commit
e1eab7dfa6
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue