Skip to content

Commit

Permalink
validate AN cap only when there is an update to AN config
Browse files Browse the repository at this point in the history
Signed-off-by: Dante Su <dante.su@broadcom.com>
  • Loading branch information
ds952811 committed Jul 26, 2022
1 parent 3e6198a commit 4179978
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3157,21 +3157,21 @@ void PortsOrch::doPortTask(Consumer &consumer)
it = consumer.m_toSync.erase(it);
continue;
}
if (p.m_cap_an < 0)
{
initPortCapAutoNeg(p);
m_portList[alias] = p;
}
if (p.m_cap_an < 1)
{
SWSS_LOG_ERROR("%s: autoneg is not supported (cap=%d)", p.m_alias.c_str(), p.m_cap_an);
// autoneg is not supported, don't retry
it = consumer.m_toSync.erase(it);
continue;
}
an = autoneg_mode_map[an_str];
if (an != p.m_autoneg)
{
if (p.m_cap_an < 0)
{
initPortCapAutoNeg(p);
m_portList[alias] = p;
}
if (p.m_cap_an < 1)
{
SWSS_LOG_ERROR("%s: autoneg is not supported (cap=%d)", p.m_alias.c_str(), p.m_cap_an);
// autoneg is not supported, don't retry
it = consumer.m_toSync.erase(it);
continue;
}
if (p.m_admin_state_up)
{
/* Bring port down before applying speed */
Expand Down Expand Up @@ -3228,7 +3228,7 @@ void PortsOrch::doPortTask(Consumer &consumer)
}
if (p.m_cap_lt < 1)
{
SWSS_LOG_WARN("%s: LT is not supported by the ASIC", alias.c_str());
SWSS_LOG_WARN("%s: LT is not supported(cap=%d)", alias.c_str(), p.m_cap_lt);
// Don't retry
it = consumer.m_toSync.erase(it);
continue;
Expand Down

0 comments on commit 4179978

Please sign in to comment.