Skip to content

[sonic_xcvr] Restore Abort advertisement in FW mgmt features#722

Merged
prgeor merged 1 commit into
sonic-net:masterfrom
pnakka28:cdb_abort_support
Jul 17, 2026
Merged

[sonic_xcvr] Restore Abort advertisement in FW mgmt features#722
prgeor merged 1 commit into
sonic-net:masterfrom
pnakka28:cdb_abort_support

Conversation

@pnakka28

Copy link
Copy Markdown
Contributor

Description

Restore the "Abort CMD102h supported" advertisement in the CDB firmware management features return text.

When get_module_fw_mgmt_feature() was refactored to route all firmware-management features through CdbFwHandler.get_fw_mgmt_features(). This dropped the Abort CMD102h supported line that the previous implementation emitted, and the abort advertisement was not captured in return text.

Changes:

  • cdb/cdb_fw.py: capture is_abort_supported from the reply and include it in get_fw_mgmt_features().
  • Restore Abort CMD102h supported <bool> in the info text.
  • Updated test_cdb_fw.py and test_cmis.py based on the changes.

Motivation and Context

How Has This Been Tested?

  • Unit tests: test_cdb_fw.py and test_cmis.py passed.
  • Tested on hardware get_module_fw_mgmt_feature() API now reports Abort CMD102h supported <bool>.

Additional Information (Optional)

Signed-off-by: Pavan Kalyan Nakka <pnakka@microsoft.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

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

@pnakka28 pnakka28 changed the title Restore Abort advertisement in FW mgmt features [sonic_xcvr] Restore Abort advertisement in FW mgmt features Jul 17, 2026
@prgeor
prgeor requested review from Copilot and prgeor July 17, 2026 21:13

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 restores the “Abort CMD102h supported” advertisement in the CMIS CDB firmware-management features info text returned by the public transceiver API, after a prior refactor moved feature collection into CdbFwHandler.get_fw_mgmt_features().

Changes:

  • Decode and propagate the “abort supported” bit from the firmware management advertisement field through CdbFwHandler.get_fw_mgmt_features().
  • Re-add Abort CMD102h supported <bool> to the get_module_fw_mgmt_feature() returned info text.
  • Update unit tests to reflect the updated get_fw_mgmt_features() tuple shape.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/sonic_xcvr/test_cmis.py Updates mocked firmware-feature tuples to include abort support bit.
tests/sonic_xcvr/test_cdb_fw.py Updates expected get_fw_mgmt_features() return tuple to include abort support.
sonic_platform_base/sonic_xcvr/mem_maps/public/cmis/pages/page9f_cdb.py Ensures firmware-mgmt advertisement field decodes into per-bit values (bitdecode=True).
sonic_platform_base/sonic_xcvr/cdb/cdb_fw.py Captures abort support bit and returns it via get_fw_mgmt_features().
sonic_platform_base/sonic_xcvr/api/public/cdb_fw.py Restores abort support advertisement line in returned info text.

Comment thread sonic_platform_base/sonic_xcvr/api/public/cdb_fw.py
mgmt_features_adv = reply.get(cdb_consts.CDB_FIRMWARE_MGMT_ADV, {})
self.start_payload_size = reply[cdb_consts.CDB_START_CMD_PAYLOAD_SIZE]
self.is_lpl_only = reply[cdb_consts.CDB_WRITE_MECHANISM] == "LPL"
self.rw_length_ext = reply[cdb_consts.CDB_READ_WRITE_LENGTH_EXT] + 8
@prgeor
prgeor merged commit 95e4796 into sonic-net:master Jul 17, 2026
6 checks passed
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.

4 participants