Skip to content

Commit

Permalink
Initialize port autoneg status.
Browse files Browse the repository at this point in the history
Initialize port.m_autoneg from chip AN setting.
  • Loading branch information
PJHsieh committed Jul 8, 2024
1 parent 85b851b commit 8f7c41a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5330,8 +5330,11 @@ bool PortsOrch::initializePort(Port &port)
return false;
}

/* initialize port autoneg status */
port.m_autoneg = isAutoNegEnabled(port.m_port_id);

/* initialize port admin speed */
if (!isAutoNegEnabled(port.m_port_id) && !getPortSpeed(port.m_port_id, port.m_speed))
if (!port.m_autoneg && !getPortSpeed(port.m_port_id, port.m_speed))
{
SWSS_LOG_ERROR("Failed to get initial port admin speed %d", port.m_speed);
return false;
Expand Down

0 comments on commit 8f7c41a

Please sign in to comment.