public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] net: dsa: microchip: Move *_port_setup code to dsa_switch_ops::port_setup()
@ 2023-09-14 13:11 Oleksij Rempel
  2023-09-14 13:11 ` [PATCH net-next 2/2] net: dsa: microchip: Add partial ACL support for ksz9477 switches Oleksij Rempel
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Oleksij Rempel @ 2023-09-14 13:11 UTC (permalink / raw)
  To: David S. Miller, Andrew Lunn, Eric Dumazet, Florian Fainelli,
	Jakub Kicinski, Paolo Abeni, Vladimir Oltean, Woojung Huh,
	Arun Ramadoss, Russell King (Oracle)
  Cc: Oleksij Rempel, kernel, linux-kernel, netdev, UNGLinuxDriver,
	Petr Machata, Lukasz Majewski

Right now, the *_port_setup code is in dsa_switch_ops::port_enable(),
which is not the best place for it. This patch moves it to a more
suitable place, dsa_switch_ops::port_setup(), to match the function's
purpose and name.

This patch is a preparation for coming ACL support patch.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/dsa/microchip/ksz_common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 54048b82db71..209a5243bd5a 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -2564,8 +2564,7 @@ static int ksz_port_mdb_del(struct dsa_switch *ds, int port,
 	return dev->dev_ops->mdb_del(dev, port, mdb, db);
 }
 
-static int ksz_enable_port(struct dsa_switch *ds, int port,
-			   struct phy_device *phy)
+static int ksz_port_setup(struct dsa_switch *ds, int port)
 {
 	struct ksz_device *dev = ds->priv;
 
@@ -3497,7 +3496,7 @@ static const struct dsa_switch_ops ksz_switch_ops = {
 	.phylink_mac_config	= ksz_phylink_mac_config,
 	.phylink_mac_link_up	= ksz_phylink_mac_link_up,
 	.phylink_mac_link_down	= ksz_mac_link_down,
-	.port_enable		= ksz_enable_port,
+	.port_setup		= ksz_port_setup,
 	.set_ageing_time	= ksz_set_ageing_time,
 	.get_strings		= ksz_get_strings,
 	.get_ethtool_stats	= ksz_get_ethtool_stats,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-17 13:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14 13:11 [PATCH net-next 1/2] net: dsa: microchip: Move *_port_setup code to dsa_switch_ops::port_setup() Oleksij Rempel
2023-09-14 13:11 ` [PATCH net-next 2/2] net: dsa: microchip: Add partial ACL support for ksz9477 switches Oleksij Rempel
2023-09-15 14:43   ` Vladimir Oltean
2023-09-15 14:35 ` [PATCH net-next 1/2] net: dsa: microchip: Move *_port_setup code to dsa_switch_ops::port_setup() Vladimir Oltean
2023-09-15 16:37 ` Florian Fainelli
2023-09-17 13:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox