]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: add support for mac_prepare() and mac_finish() calls
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 25 May 2023 10:38:44 +0000 (11:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:46:50 +0000 (07:46 +0200)
commitf27b1e1fd32905f1de06f13b02fac2ae6d1382af
tree4aad60aec0aa50efa388a927cc7c16f06f114e89
parent9369d414ee70f4c76a7e100f2508e1be873641d0
net: dsa: add support for mac_prepare() and mac_finish() calls

[ Upstream commit dd805cf3e80e038aeb06902399ce9bd6fafb4ff3 ]

Add DSA support for the phylink mac_prepare() and mac_finish() calls.
These were introduced as part of the PCS support to allow MACs to
perform preparatory steps prior to configuration, and finalisation
steps after the MAC and PCS has been configured.

Introducing phylink_pcs support to the mv88e6xxx DSA driver needs some
code moved out of its mac_config() stage into the mac_prepare() and
mac_finish() stages, and this commit facilitates such code in DSA
drivers.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 52fdc41c3278 ("net: dsa: mv88e6xxx: fix internal PHYs for 6320 family")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/dsa.h
net/dsa/port.c