Skip to content

Commit

Permalink
net: lan966x: Fix the configuration of the pcs
Browse files Browse the repository at this point in the history
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: d28d6d2 ("net: lan966x: add port module support")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Horatiu Vultur authored and David S. Miller committed Dec 13, 2021
1 parent 87f7282 commit b26980a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/net/ethernet/microchip/lan966x/lan966x_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand All @@ -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;
Expand Down

0 comments on commit b26980a

Please sign in to comment.