diff --git a/inc/saiport.h b/inc/saiport.h index 8055593009..c8d237e7e6 100644 --- a/inc/saiport.h +++ b/inc/saiport.h @@ -166,6 +166,53 @@ typedef enum _sai_port_media_type_t SAI_PORT_MEDIA_TYPE_BACKPLANE, } sai_port_media_type_t; +/** + * @brief Attribute data for #SAI_PORT_ATTR_CABLE_PAIR_STATE + * Copper cable pair states + */ +typedef enum _sai_port_cable_pair_state_t +{ + /** Cable state no faults */ + SAI_PORT_CABLE_PAIR_STATE_OK, + + /** Cable state open */ + SAI_PORT_CABLE_PAIR_STATE_OPEN, + + /** Cable state short */ + SAI_PORT_CABLE_PAIR_STATE_SHORT, + + /** Cable state cross talk */ + SAI_PORT_CABLE_PAIR_STATE_CROSSTALK, + + /** Cable state unknown */ + SAI_PORT_CABLE_PAIR_STATE_UNKNOWN +} sai_port_cable_pair_state_t; + +/** + * @brief Attribute data for #SAI_PORT_ATTR_CABLE_TYPE + * Copper cable types + */ +typedef enum _sai_port_cable_type_t +{ + /** Cable type Unknown */ + SAI_PORT_CABLE_TYPE_UNKNOWN, + + /** Cable type CAT5 */ + SAI_PORT_CABLE_TYPE_CAT5, + + /** Cable type CAT5E */ + SAI_PORT_CABLE_TYPE_CAT5E, + + /** Cable type CAT6 */ + SAI_PORT_CABLE_TYPE_CAT6, + + /** Cable type CAT6A */ + SAI_PORT_CABLE_TYPE_CAT6A, + + /** Cable type CAT7 */ + SAI_PORT_CABLE_TYPE_CAT7 +} sai_port_cable_type_t; + /** * @brief Breakout Mode types based on number * of SerDes lanes used in a port @@ -2400,6 +2447,40 @@ typedef enum _sai_port_attr_t */ SAI_PORT_ATTR_DATAPATH_ENABLE, + /** + * @brief Read ethernet copper cable pair status. + * + * Returns pair states sequentially from list index 0 to n (n = number of pairs - 1) + * value of n depends on number of pairs in twisted ethernet copper cable + * Cable diagnostics triggers ECD once cable pair states is requested, it is synchronous call. + * + * @type sai_s32_list_t sai_port_cable_pair_state_t + * @flags READ_ONLY + */ + SAI_PORT_ATTR_CABLE_PAIR_STATE, + + /** + * @brief Get ethernet copper cable pair length (unit meter) + * + * Returns ethernet cable pair length sequentially from list index 0 to n (n = number of pairs - 1) + * value of n depends on number of pairs in twisted ethernet copper cable + * Cable diagnostics runs once cable pair length is requested, it is synchronous call. + * + * @type sai_s32_list_t + * @flags READ_ONLY + */ + SAI_PORT_ATTR_CABLE_PAIR_LENGTH, + + /** + * @brief Configure ethernet copper cable type to check the cable status + * + * @type sai_port_cable_type_t + * @flags CREATE_AND_SET + * @default SAI_PORT_CABLE_TYPE_UNKNOWN + * @validonly SAI_PORT_ATTR_MEDIA_TYPE == SAI_PORT_MEDIA_TYPE_COPPER + */ + SAI_PORT_ATTR_CABLE_TYPE, + /** * @brief End of attributes */