mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
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: 946e7fd505
("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>
This commit is contained in:
parent
fe87922cee
commit
33623113a4
1 changed files with 2 additions and 2 deletions
|
@ -731,7 +731,7 @@ static int sparx5_port_pcs_low_set(struct sparx5 *sparx5,
|
|||
bool sgmii = false, inband_aneg = false;
|
||||
int err;
|
||||
|
||||
if (port->conf.inband) {
|
||||
if (conf->inband) {
|
||||
if (conf->portmode == PHY_INTERFACE_MODE_SGMII ||
|
||||
conf->portmode == PHY_INTERFACE_MODE_QSGMII)
|
||||
inband_aneg = true; /* Cisco-SGMII in-band-aneg */
|
||||
|
@ -948,7 +948,7 @@ int sparx5_port_pcs_set(struct sparx5 *sparx5,
|
|||
if (err)
|
||||
return -EINVAL;
|
||||
|
||||
if (port->conf.inband) {
|
||||
if (conf->inband) {
|
||||
/* Enable/disable 1G counters in ASM */
|
||||
spx5_rmw(ASM_PORT_CFG_CSC_STAT_DIS_SET(high_speed_dev),
|
||||
ASM_PORT_CFG_CSC_STAT_DIS,
|
||||
|
|
Loading…
Reference in a new issue