Skip to content

Commit d9a1f03

Browse files
committed
Squashed commit of the following:
commit 18632a3 Author: Dante Su <[email protected]> Date: Mon May 23 12:22:49 2022 +0000 optimize port state refresh logic Signed-off-by: Dante Su <[email protected]> commit 081d491 Author: ds952811 <[email protected]> Date: Mon May 23 02:33:56 2022 +0000 address review comments Signed-off-by: ds952811 <[email protected]> commit 84bdde4 Author: Dante Su <[email protected]> Date: Fri May 20 02:15:59 2022 +0000 update the default LT capability upon get failures Signed-off-by: Dante Su <[email protected]> commit 0f73666 Author: Dante Su <[email protected]> Date: Thu May 19 11:28:38 2022 +0000 Rename updatePortStatesXX as refreshPortStatesXX Signed-off-by: Dante Su <[email protected]> commit ddd57fe Author: Dante Su <[email protected]> Date: Thu May 19 04:03:13 2022 +0000 Have AN cap defaults to 1, and use AN attr for LT cap query Signed-off-by: Dante Su <[email protected]> commit 876e605 Author: Dante Su <[email protected]> Date: Fri May 13 11:15:12 2022 +0000 drop LT capability query Signed-off-by: Dante Su <[email protected]> commit 55ced7d Author: Dante Su <[email protected]> Date: Fri Apr 29 13:53:17 2022 +0000 incorporate autoneg support from PR#2215 Signed-off-by: Dante Su <[email protected]> commit a04594e Author: Dante Su <[email protected]> Date: Thu Apr 28 16:33:14 2022 +0000 address review comments Signed-off-by: Dante Su <[email protected]> commit e9eeb9a Author: Dante Su <[email protected]> Date: Thu Apr 28 15:00:04 2022 +0000 address review comments Signed-off-by: Dante Su <[email protected]> commit 4ff604d Author: Dante Su <[email protected]> Date: Fri Apr 22 03:51:56 2022 +0000 Stop the port state poll by default Signed-off-by: Dante Su <[email protected]> commit bdfb8d8 Author: Dante Su <[email protected]> Date: Fri Apr 22 03:48:07 2022 +0000 address review comments Signed-off-by: Dante Su <[email protected]> commit 1c6bda8 Author: Dante Su <[email protected]> Date: Mon Apr 18 08:46:21 2022 +0000 Restore pre-emphasis when LT is transitioned from ON to OFF Signed-off-by: Dante Su <[email protected]> commit 09a9b33 Author: Dante Su <[email protected]> Date: Mon Apr 18 02:33:11 2022 +0000 fix build failure due to SAI_PORT_ATTR_SUPPORTED_LINK_TRAINING_MODE Signed-off-by: Dante Su <[email protected]> commit b0bee3e Author: Dante Su <[email protected]> Date: Thu Apr 14 07:54:14 2022 +0000 address review comments Signed-off-by: Dante Su <[email protected]> commit c4345ef Author: Dante Su <[email protected]> Date: Fri Mar 25 02:26:05 2022 +0000 portsorch: initial support for link-training - What I did Add Link-Training support to portsorch, while Gearbox is not in the scope - Why I did it In the case of DAC, static pre-calibrated pre-emphasis is rarely available on SONIC, as most of the ODM are expecting this to be done dynamically at runtime via link-training, hence we'll need this feature to improve the link quality - How I verified it Manual test Ran the Unit-tests to the corresponding changes Signed-off-by: Dante Su <[email protected]>
1 parent bf4d890 commit d9a1f03

File tree

5 files changed

+564
-4
lines changed

5 files changed

+564
-4
lines changed

orchagent/port.h

+7
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ class Port
113113
uint32_t m_speed = 0; // Mbps
114114
std::string m_learn_mode = "hardware";
115115
int m_autoneg = -1; // -1 means not set, 0 = disabled, 1 = enabled
116+
int m_link_training = -1; // -1 means not set, 0 = disabled, 1 = enabled
116117
bool m_admin_state_up = false;
117118
bool m_init = false;
118119
bool m_l3_vni = false;
@@ -174,8 +175,14 @@ class Port
174175
sai_object_id_t m_system_side_id = 0;
175176
sai_object_id_t m_line_side_id = 0;
176177

178+
/* pre-emphasis */
179+
std::map<sai_port_serdes_attr_t, std::vector<uint32_t>> m_preemphasis;
180+
177181
bool m_fec_cfg = false;
178182
bool m_an_cfg = false;
183+
184+
int m_cap_an = -1; /* Capability - AutoNeg, -1 means not set */
185+
int m_cap_lt = -1; /* Capability - LinkTraining, -1 means not set */
179186
};
180187

181188
}

0 commit comments

Comments
 (0)