Skip to content

Commit d945093

Browse files
Danielmachonkuba-moo
authored andcommitted
net: sparx5: skip low-speed configuration when port is RGMII
When doing a port config, we configure low-speed port devices, among other things. We have a check to ensure, that the device is indeed a low-speed device, an not a high-speed device. Add an additional check, to ensure that the device is not an RGMII device. Reviewed-by: Steen Hegelund <[email protected]> Reviewed-by: Horatiu Vultur <[email protected]> Tested-by: Robert Marko <[email protected]> Signed-off-by: Daniel Machon <[email protected]> Link: https://patch.msgid.link/20241220-sparx5-lan969x-switch-driver-4-v5-4-fa8ba5dff732@microchip.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 05bda8a commit d945093

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/microchip/sparx5/sparx5_port.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@ int sparx5_port_config(struct sparx5 *sparx5,
994994
struct sparx5_port *port,
995995
struct sparx5_port_config *conf)
996996
{
997+
bool rgmii = phy_interface_mode_is_rgmii(conf->phy_mode);
997998
bool high_speed_dev = sparx5_is_baser(conf->portmode);
998999
const struct sparx5_ops *ops = sparx5->data->ops;
9991000
int err, urgency, stop_wm;
@@ -1003,7 +1004,7 @@ int sparx5_port_config(struct sparx5 *sparx5,
10031004
return err;
10041005

10051006
/* high speed device is already configured */
1006-
if (!high_speed_dev)
1007+
if (!rgmii && !high_speed_dev)
10071008
sparx5_port_config_low_set(sparx5, port, conf);
10081009

10091010
/* Configure flow control */

0 commit comments

Comments
 (0)