net: ethernet: mtk_eth_soc: only write values if needed
authorDaniel Golle <daniel@makrotopia.org>
Tue, 14 Mar 2023 00:34:45 +0000 (00:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Mar 2023 08:58:13 +0000 (08:58 +0000)
commit6e933a804c7db8be64f367f33e63cd7dcc302ebb
tree0cbe15b47d291ee459ccd4a7a31e3594b4e73d5f
parent611e2dabb4b3243d176739fd6a5a34d007fa3f86
net: ethernet: mtk_eth_soc: only write values if needed

Only restart auto-negotiation and write link timer if actually
necessary. This prevents losing the link in case of minor
changes.

Fixes: 7e538372694b ("net: ethernet: mediatek: Re-add support SGMII")
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_sgmii.c