Skip to content

Commit 3362311

Browse files
DanielmachonPaolo Abeni
authored andcommitted
net: sparx5: fix wrong config being used when reconfiguring PCS
The wrong port config is being used if the PCS is reconfigured. Fix this by correctly using the new config instead of the old one. Fixes: 946e7fd ("net: sparx5: add port module support") Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20240409-link-mode-reconfiguration-fix-v2-1-db6a507f3627@microchip.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent fe87922 commit 3362311

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ static int sparx5_port_pcs_low_set(struct sparx5 *sparx5,
731731
bool sgmii = false, inband_aneg = false;
732732
int err;
733733

734-
if (port->conf.inband) {
734+
if (conf->inband) {
735735
if (conf->portmode == PHY_INTERFACE_MODE_SGMII ||
736736
conf->portmode == PHY_INTERFACE_MODE_QSGMII)
737737
inband_aneg = true; /* Cisco-SGMII in-band-aneg */
@@ -948,7 +948,7 @@ int sparx5_port_pcs_set(struct sparx5 *sparx5,
948948
if (err)
949949
return -EINVAL;
950950

951-
if (port->conf.inband) {
951+
if (conf->inband) {
952952
/* Enable/disable 1G counters in ASM */
953953
spx5_rmw(ASM_PORT_CFG_CSC_STAT_DIS_SET(high_speed_dev),
954954
ASM_PORT_CFG_CSC_STAT_DIS,

0 commit comments

Comments
 (0)