]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: sja1105: simplify static configuration reload
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 1 Oct 2024 16:04:36 +0000 (17:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:12:41 +0000 (06:12 +0900)
commit3b7234417a37ffba33b0f709c2cbfcf3f28cbd40
treec412f0cb67e2d29699b7c801879c8121de6ceb37
parent89ade758ed49833294eab886bdc561f886b1731f
net: dsa: sja1105: simplify static configuration reload

[ Upstream commit a18891b55703a45b700618ef40edd5e9aaecc345 ]

The static configuration reload saves the port speed in the static
configuration tables by first converting it from the internal
respresentation to the SPEED_xxx ethtool representation, and then
converts it back to restore the setting. This is because
sja1105_adjust_port_config() takes the speed as SPEED_xxx.

However, this is unnecessarily complex. If we split
sja1105_adjust_port_config() up, we can simply save and restore the
mac[port].speed member in the static configuration tables.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1svfMa-005ZIX-If@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: da62abaaa268 ("net: dsa: sja1105: fix SGMII linking at 10M or 100M but not passing traffic")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/sja1105/sja1105_main.c