Skip to content

Commit

Permalink
net: phylink: avoid mac_config calls
Browse files Browse the repository at this point in the history
Avoid calling mac_config() when using split PCS, and the interface
remains the same.

Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: Russell King <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Russell King authored and davem330 committed Jul 21, 2020
1 parent 5005b16 commit 7cceb59
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/phy/phylink.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,12 @@ static void phylink_resolve(struct work_struct *w)
}
phylink_pcs_config(pl, false, &link_state);
pl->link_config.interface = link_state.interface;
} else {
} else if (!pl->pcs_ops) {
/* The interface remains unchanged, only the speed,
* duplex or pause settings have changed. Call the
* old mac_config() method to configure the MAC/PCS.
* old mac_config() method to configure the MAC/PCS
* only if we do not have a PCS installed (an
* unconverted user.)
*/
phylink_mac_config(pl, &link_state);
}
Expand Down

0 comments on commit 7cceb59

Please sign in to comment.