Skip to content

Remove PENDING flag check in CMIS SM#825

Open
noaOrMlnx wants to merge 1 commit into
sonic-net:masterfrom
noaOrMlnx:remove_cmis_sm_pending_check
Open

Remove PENDING flag check in CMIS SM#825
noaOrMlnx wants to merge 1 commit into
sonic-net:masterfrom
noaOrMlnx:remove_cmis_sm_pending_check

Conversation

@noaOrMlnx

Copy link
Copy Markdown
Collaborator

Description

Removed the check in CMIS SM that waits for PENDING flag.
This PR aims to fix sonic-net/sonic-buildimage#27582

Motivation and Context

The removed code block is not accurate according to CMIS spec - this flag is not a good indicator for states transition.

  1. The DP_INIT_PENDING flag is not defined as a reliable indicator for validating the DP_INIT state. It is intended only as supplementary information and should not be used by the NOS to control state progression.
  2. The specification does not define a minimum duration for which the PENDING flag must remain asserted. On faster modules, the transition may complete before the NOS has a chance to observe this flag.
  3. In the next CMIS state (TXON), we will check whether the module state is DataPathInitialized. This is the required indicator, making the PENDING check unnecessary.

How Has This Been Tested?

This is only informational flag, so removing it cannot fail anything.
The next state check is the right indicator and already exists.
this was tested with CMIS host mgmt. modules.

Additional Information (Optional)

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: noaOrMlnx <noaor@nvidia.com>
@noaOrMlnx noaOrMlnx force-pushed the remove_cmis_sm_pending_check branch from bfa41b9 to 398ffb8 Compare May 28, 2026 20:07
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the CMIS state machine in sonic-xcvrd to stop waiting for the CMIS datapath “PENDING” flag during the DP_INIT phase, aligning behavior with CMIS-spec guidance and addressing the linked sonic-buildimage issue.

Changes:

  • Removed the CMIS 5.x DP_INIT_PENDING check that could trigger force_cmis_reinit() if the pending flag was not observed.
  • Relied on the subsequent DataPathInitialized state validation (already present in the next state) as the authoritative transition indicator.

self.force_cmis_reinit(lport, retries + 1)
return

# Ensure the Datapath is NOT Activated unless the host Tx siganl is good.
Comment on lines 1181 to 1184
self.force_cmis_reinit(lport)
return

if hasattr(api, 'get_cmis_rev'):
# Check datapath init pending on module that supports CMIS 5.x
majorRev = int(api.get_cmis_rev().split('.')[0])
if majorRev >= 5 and not self.check_datapath_init_pending(api, host_lanes_mask):
self.log_notice("{}: datapath init not pending".format(lport))
self.force_cmis_reinit(lport, retries + 1)
return

# Ensure the Datapath is NOT Activated unless the host Tx siganl is good.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: CMIS SM checks datapath init pending as necessary condition to continue the SM

3 participants