@@ -3812,9 +3812,9 @@ bool PortsOrch::initPort(const PortConfig &port)
38123812 }
38133813 if (flex_counters_orch->getPortAttrCountersState ())
38143814 {
3815- if (p. m_type == Port::Type::PHY && supportsPortAttr (p. m_port_id , p. m_alias . c_str () ))
3815+ if (!m_supported_phy_attrs. empty ( ))
38163816 {
3817- if (!m_supported_phy_attrs. empty ( ))
3817+ if (p. m_type == Port::Type::PHY && supportsPortAttr (p. m_port_id , p. m_alias . c_str () ))
38183818 {
38193819 auto port_attr_stats = generateCounterStats (m_supported_phy_attrs, sai_serialize_port_attr);
38203820 port_attr_manager.setCounterIdList (p.m_port_id ,
@@ -3906,9 +3906,9 @@ void PortsOrch::deInitPort(string alias, sai_object_id_t port_id)
39063906 {
39073907 wred_port_stat_manager.clearCounterIdList (p.m_port_id );
39083908 }
3909- if (p. m_type == Port::Type::PHY && supportsPortAttr (p. m_port_id , p. m_alias . c_str () ))
3909+ if (!m_supported_phy_attrs. empty ( ))
39103910 {
3911- if (!m_supported_phy_attrs. empty ( ))
3911+ if (p. m_type == Port::Type::PHY && supportsPortAttr (p. m_port_id , p. m_alias . c_str () ))
39123912 {
39133913 port_attr_manager.clearCounterIdList (p.m_port_id );
39143914 }
@@ -8422,8 +8422,6 @@ void PortsOrch::queryPortAttrCapabilities()
84228422 SWSS_LOG_NOTICE (" PORT_ATTR: Attribute %s is NOT supported (status=%d, get_implemented=%d)" ,
84238423 attr_name, status, capability.get_implemented );
84248424 }
8425- // TODO: remove the next line once brcm support attribute query capability
8426- m_supported_phy_attrs.push_back (attr_id);
84278425 }
84288426
84298427 m_phy_attr_capability_checked = true ;
0 commit comments