netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: lan966x: Fix the configuration of the pcs
@ 2021-12-11 21:44 Horatiu Vultur
  2021-12-13 14:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Horatiu Vultur @ 2021-12-11 21:44 UTC (permalink / raw)
  To: netdev, linux-kernel; +Cc: UNGLinuxDriver, davem, kuba, linux, Horatiu Vultur

When inserting a SFP that runs at 2.5G, then the Serdes was still
configured to run at 1G. Because the config->speed was 0, and then the
speed of the serdes was not configured at all, it was using the default
value which is 1G. This patch stop calling the serdes function set_speed
and allow the serdes to figure out the speed based on the interface
type.

Fixes: d28d6d2e37d10d ("net: lan966x: add port module support")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 drivers/net/ethernet/microchip/lan966x/lan966x_port.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_port.c b/drivers/net/ethernet/microchip/lan966x/lan966x_port.c
index 2ddb20585d40..237555845a52 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_port.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_port.c
@@ -331,7 +331,6 @@ int lan966x_port_pcs_set(struct lan966x_port *port,
 	struct lan966x *lan966x = port->lan966x;
 	bool inband_aneg = false;
 	bool outband;
-	int err;
 
 	if (config->inband) {
 		if (config->portmode == PHY_INTERFACE_MODE_SGMII ||
@@ -341,11 +340,6 @@ int lan966x_port_pcs_set(struct lan966x_port *port,
 			 config->autoneg)
 			inband_aneg = true; /* Clause-37 in-band-aneg */
 
-		if (config->speed > 0) {
-			err = phy_set_speed(port->serdes, config->speed);
-			if (err)
-				return err;
-		}
 		outband = false;
 	} else {
 		outband = true;
-- 
2.33.0


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

* Re: [PATCH net-next] net: lan966x: Fix the configuration of the pcs
  2021-12-11 21:44 [PATCH net-next] net: lan966x: Fix the configuration of the pcs Horatiu Vultur
@ 2021-12-13 14:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-13 14:50 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 David S. Miller <davem@davemloft.net>:

On Sat, 11 Dec 2021 22:44:20 +0100 you wrote:
> When inserting a SFP that runs at 2.5G, then the Serdes was still
> configured to run at 1G. Because the config->speed was 0, and then the
> speed of the serdes was not configured at all, it was using the default
> value which is 1G. This patch stop calling the serdes function set_speed
> and allow the serdes to figure out the speed based on the interface
> type.
> 
> [...]

Here is the summary with links:
  - [net-next] net: lan966x: Fix the configuration of the pcs
    https://git.kernel.org/netdev/net-next/c/b26980ab2a97

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] 2+ messages in thread

end of thread, other threads:[~2021-12-13 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-11 21:44 [PATCH net-next] net: lan966x: Fix the configuration of the pcs Horatiu Vultur
2021-12-13 14:50 ` 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;
as well as URLs for NNTP newsgroup(s).