Skip to contentSkip to conversation

net: sparx5: use .mac_select_pcs() interface

PATCH Applied Russell King (Oracle) 2 participants 2 messages Jan 27, 2022 – Jan 28, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: sparx5: use .mac_select_pcs() interface

Convert sparx5 to use the mac_select_interface rather than using phylink_set_pcs(). The intention here is to unify the approach for PCS and eventually remove phylink_set_pcs().

---
 drivers/net/ethernet/microchip/sparx5/sparx5_main.c    |  1 -
 drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c | 10 ++++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
drivers/net/ethernet/microchip/sparx5/sparx5_main.c +0 -1
index 16266275dd36..35689b5e212c 100644
@@ -328,7 +328,6 @@ static int sparx5_create_port(struct sparx5 *sparx5,
 		return PTR_ERR(phylink);
 
 	spx5_port->phylink = phylink;
-	phylink_set_pcs(phylink, &spx5_port->phylink_pcs);
 
 	return 0;
 }
drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c +10 -0
index 8ba33bc1a001..830da0e5ff27 100644
@@ -26,6 +26,15 @@ static bool port_conf_has_changed(struct sparx5_port_config *a, struct sparx5_po
 	return false;
 }
 
+static struct phylink_pcs *
+sparx5_phylink_mac_select_pcs(struct phylink_config *config,
+			      phy_interface_t interface)
+{
+	struct sparx5_port *port = netdev_priv(to_net_dev(config->dev));
+
+	return &port->phylink_pcs;
+}
+
 static void sparx5_phylink_mac_config(struct phylink_config *config,
 				      unsigned int mode,
 				      const struct phylink_link_state *state)
@@ -130,6 +139,7 @@ const struct phylink_pcs_ops sparx5_phylink_pcs_ops = {
 
 const struct phylink_mac_ops sparx5_phylink_mac_ops = {
 	.validate = phylink_generic_validate,
+	.mac_select_pcs = sparx5_phylink_mac_select_pcs,
 	.mac_config = sparx5_phylink_mac_config,
 	.mac_link_down = sparx5_phylink_mac_link_down,
 	.mac_link_up = sparx5_phylink_mac_link_up,
Signature · 1 line
2.30.2
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 9 lines · On Thu, 27 Jan 2022 10:54:52 +0000 you wrote:

Convert sparx5 to use the mac_select_interface rather than using phylink_set_pcs(). The intention here is to unify the approach for PCS and eventually remove phylink_set_pcs().

---
 drivers/net/ethernet/microchip/sparx5/sparx5_main.c    |  1 -
 drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c | 10 ++++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

Here is the summary with links:
- [net-next] net: sparx5: use .mac_select_pcs() interface

    https://git.kernel.org/netdev/net-next/c/9c8c44022b0d

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html