[PATCH 4/9] net: ethernet: mtk_eth_soc: only write values if needed
Andrew Lunn
andrew at lunn.ch
Fri Feb 3 06:08:28 PST 2023
On Fri, Feb 03, 2023 at 07:02:01AM +0000, Daniel Golle wrote:
> Only restart auto-negotiation and write link timer if actually
> necessary.
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> ---
> drivers/net/ethernet/mediatek/mtk_sgmii.c | 24 +++++++++++------------
> 1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/ethernet/mediatek/mtk_sgmii.c b/drivers/net/ethernet/mediatek/mtk_sgmii.c
> index f3cf66a23e72..58b5f2f70a66 100644
> --- a/drivers/net/ethernet/mediatek/mtk_sgmii.c
> +++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c
> @@ -41,17 +41,13 @@ static int mtk_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
> struct mtk_pcs *mpcs = pcs_to_mtk_pcs(pcs);
> unsigned int rgc3, sgm_mode, bmcr;
> int advertise, link_timer;
> - bool changed, use_an;
> + bool mode_changed = false, changed, use_an;
Reverse Christmas tree .... Please check all the patches.
Andrew
More information about the Linux-mediatek
mailing list