Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mdio access type (clause 45/clause 22) attribute #1493

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions inc/saiswitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,19 @@ typedef enum _sai_switch_hardware_access_bus_t

} sai_switch_hardware_access_bus_t;

/**
* @brief Attribute data for #SAI_SWITCH_ATTR_MDIO_ACCESS_TYPE
*/
typedef enum _sai_switch_mdio_clause_t
{
/** MDIO Clause 22 */
SAI_SWITCH_MDIO_CLAUSE_22,

/** MDIO Clause 45 */
SAI_SWITCH_MDIO_CLAUSE_45,

} sai_switch_mdio_clause_t;

/**
* @brief Attribute data for #SAI_SWITCH_ATTR_FIRMWARE_LOAD_METHOD
*/
Expand Down Expand Up @@ -2776,6 +2789,17 @@ typedef enum _sai_switch_attr_t
*/
SAI_SWITCH_ATTR_ECMP_MEMBER_COUNT,

/**
* @brief Switch MDIO access type
*
* set mdio access type (clause 22 or clause 45) before calling sai_switch_mdio_read_fn and sai_switch_mdio_write_fn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't the platform decide to choose between cl22 or cl45 for the mdio r/w? why should a higher SAI layer tell which one to choose? i am not able to understand the usecase. Can you add more to the PR description?

*
* @type sai_switch_mdio_clause_t
* @flags CREATE_AND_SET
* @default SAI_SWITCH_MDIO_CLAUSE_45
*/
SAI_SWITCH_ATTR_MDIO_ACCESS_TYPE,

/**
* @brief End of attributes
*/
Expand Down