[202311] Disable periodic polling of port in DomInfoUpdateTask thread during CMIS init #451
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-pick for #449
Description
We currently need to disable periodic DOM polling of a port through DomInfoUpdateTask thread during CMIS initialization.
Motivation and Context
Disabling of DOM polling during CMIS initialization is primarily needed to disable sending CDB commands to read FW version from DomInfoUpdateTask thread during CMIS initialization.
For transceivers which do not support CDB background mode, any EEPROM access to the module can fail if a CDB command is executed at the same time.
In order to disable DOM polling during CMIS initialization, the
cmis_state
from CmisManagerTask thread is now being updated in theTRANSCEIVER_STATUS
table of STATE_DB.If the current
cmis_state
does not belong toCMIS_TERMINAL_STATES
, DomInfoUpdateTask will disable DOM polling for the port to allow CmisManagerTask thread to complete CMIS initialization if required.For platforms with CmisManagerTask disabled, the function
is_port_in_cmis_initialization_process
will always return False to allow DOM polling.In case of device boot-up or transceiver insertion, the DomInfoUpdateTask thread will wait for the port to be in either of the CMIS_TERMINAL_STATES before proceeding with DOM polling. For non-CMIS transceivers, the expected
cmis_state
isCMIS_STATE_READY
. Hence, once the corresponding port reachesCMIS_STATE_READY
state, DOM polling will be enabled for such port.Also, the
cmis_state
is not planned to be modified by DomInfoUpdateTask thread at any time to prevent race condition with CmisManagerTask.How Has This Been Tested?
Following is the summary of tests performed
Additional Information (Optional)
MSFT ADO - 26993372