net: dsa: mt7530: sort link settings ops and force link down on all ports
authorArınç ÜNAL <arinc.unal@arinc9.com>
Fri, 1 Mar 2024 10:43:04 +0000 (12:43 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 5 Mar 2024 11:23:43 +0000 (12:23 +0100)
commit6324230b3b675397a5bcabf9bf7b0bd0a7f2ae0a
treeba6f5575e84e1545e85499b754451e78c1dc1cd4
parent3a87131e3d72281285d4df7db2d7d3299b1edb18
net: dsa: mt7530: sort link settings ops and force link down on all ports

port_enable and port_disable clears the link settings. Move that to
mt7530_setup() and mt7531_setup_common() which set up the switches. This
way, the link settings are cleared on all ports at setup, and then only
once with phylink_mac_link_down() when a link goes down.

Enable force mode at setup to apply the force part of the link settings.
This ensures that disabled ports will have their link down.

Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/mt7530.c