public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: lan966x: use .mac_select_pcs() interface
@ 2022-02-02 11:49 Horatiu Vultur
  2022-02-02 12:46 ` Russell King (Oracle)
  2022-02-04  3:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Horatiu Vultur @ 2022-02-02 11:49 UTC (permalink / raw)
  To: netdev, linux-kernel; +Cc: UNGLinuxDriver, davem, kuba, linux, Horatiu Vultur

Convert lan966x to use the mac_select_interface instead of
phylink_set_pcs.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 drivers/net/ethernet/microchip/lan966x/lan966x_main.c    | 1 -
 drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c | 9 +++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
index 6fe4fcba4474..9cb715a25fd5 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
@@ -720,7 +720,6 @@ static int lan966x_probe_port(struct lan966x *lan966x, u32 p,
 	}
 
 	port->phylink = phylink;
-	phylink_set_pcs(phylink, &port->phylink_pcs);
 
 	err = register_netdev(dev);
 	if (err) {
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c b/drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c
index b66a9aa00ea4..38a7e95d69b4 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c
@@ -9,6 +9,14 @@
 
 #include "lan966x_main.h"
 
+static struct phylink_pcs *lan966x_phylink_mac_select(struct phylink_config *config,
+						      phy_interface_t interface)
+{
+	struct lan966x_port *port = netdev_priv(to_net_dev(config->dev));
+
+	return &port->phylink_pcs;
+}
+
 static void lan966x_phylink_mac_config(struct phylink_config *config,
 				       unsigned int mode,
 				       const struct phylink_link_state *state)
@@ -114,6 +122,7 @@ static void lan966x_pcs_aneg_restart(struct phylink_pcs *pcs)
 
 const struct phylink_mac_ops lan966x_phylink_mac_ops = {
 	.validate = phylink_generic_validate,
+	.mac_select_pcs = lan966x_phylink_mac_select,
 	.mac_config = lan966x_phylink_mac_config,
 	.mac_prepare = lan966x_phylink_mac_prepare,
 	.mac_link_down = lan966x_phylink_mac_link_down,
-- 
2.33.0


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

* Re: [PATCH net-next] net: lan966x: use .mac_select_pcs() interface
  2022-02-02 11:49 [PATCH net-next] net: lan966x: use .mac_select_pcs() interface Horatiu Vultur
@ 2022-02-02 12:46 ` Russell King (Oracle)
  2022-02-04  3:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2022-02-02 12:46 UTC (permalink / raw)
  To: Horatiu Vultur; +Cc: netdev, linux-kernel, UNGLinuxDriver, davem, kuba

On Wed, Feb 02, 2022 at 12:49:49PM +0100, Horatiu Vultur wrote:
> Convert lan966x to use the mac_select_interface instead of
> phylink_set_pcs.
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>

Thanks!

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

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

* Re: [PATCH net-next] net: lan966x: use .mac_select_pcs() interface
  2022-02-02 11:49 [PATCH net-next] net: lan966x: use .mac_select_pcs() interface Horatiu Vultur
  2022-02-02 12:46 ` Russell King (Oracle)
@ 2022-02-04  3:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-04  3:20 UTC (permalink / raw)
  To: Horatiu Vultur; +Cc: netdev, linux-kernel, UNGLinuxDriver, davem, kuba, linux

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 2 Feb 2022 12:49:49 +0100 you wrote:
> Convert lan966x to use the mac_select_interface instead of
> phylink_set_pcs.
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> ---
>  drivers/net/ethernet/microchip/lan966x/lan966x_main.c    | 1 -
>  drivers/net/ethernet/microchip/lan966x/lan966x_phylink.c | 9 +++++++++
>  2 files changed, 9 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] net: lan966x: use .mac_select_pcs() interface
    https://git.kernel.org/netdev/net-next/c/41414c9bdbb8

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-02-04  3:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-02 11:49 [PATCH net-next] net: lan966x: use .mac_select_pcs() interface Horatiu Vultur
2022-02-02 12:46 ` Russell King (Oracle)
2022-02-04  3:20 ` 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