Skip to content

Commit

Permalink
Ensure port speed update upon autonegotiation disablement
Browse files Browse the repository at this point in the history
In PortsOrch, when autonegotiation is disabled for a port, this commit ensures
that the port speed is updated correctly. If a new speed is configured while
autonegotiation is disabled, the new speed is applied; otherwise, the current
speed setting is reconfigured.
  • Loading branch information
PJHsieh committed Jan 8, 2025
1 parent b733f5a commit 774f13f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4115,8 +4115,12 @@ void PortsOrch::doPortTask(Consumer &consumer)
/* Reapply port speed after AN disabled */
if (p.m_autoneg < 1)
{
pCfg.speed.is_set = true;
pCfg.speed.value = p.m_speed;
if (pCfg.speed.is_set != true)
{
pCfg.speed.is_set = true;
pCfg.speed.value = p.m_speed;
}
/* Force update speed even if p.m_speed == pCfg.speed.value */
apply_port_speed_on_an_change_to_disabled = true;
}
}
Expand Down

0 comments on commit 774f13f

Please sign in to comment.