Skip to content

Conversation

@Junchao-Mellanox
Copy link
Contributor

Description

CdbFwHandler is created to handle CDB related command for cmis module. It should be created only CDB is supported by this module. However, the current implementation add an assertion in init function which will fail any cmis module which does not support CDB:

class CdbFwHandler(CdbCmdHandler):
    def __init__(self, reader, writer, mem_map):
        super(CdbFwHandler, self).__init__(reader, writer, mem_map)
        self.start_payload_size = 0
        self.is_lpl_only = False
        self.rw_length_ext = 0
        assert True == self.initFwHandler(), "Failed to initialize firmware handler"

The error logs:

2025 Nov 16 12:21:21.010105 sonic INFO pmon#supervisord: xcvrd Error creating API: Failed to initialize firmware handler
2025 Nov 16 12:21:21.010182 sonic INFO pmon#supervisord: xcvrd Failed to get firmware management features

Motivation and Context

Only create CdbFwHandler if module support CDB

How Has This Been Tested?

Manual test with modules that support and not support CDB
Unit test

Additional Information (Optional)

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

keboliu
keboliu previously approved these changes Nov 20, 2025
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Junchao-Mellanox
Copy link
Contributor Author

Hi @judyjoseph , could you please help review the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants