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

Cdb fw upgrade #308

Merged
merged 4 commits into from
Sep 23, 2022
Merged

Cdb fw upgrade #308

merged 4 commits into from
Sep 23, 2022

Conversation

CliveNi
Copy link
Contributor

@CliveNi CliveNi commented Sep 2, 2022

[Cloudlight] QSFP-DD FW upgrade doesn't work (#257)

Description

  • Fix : cdb1_chkstatus crash when i2c NACK or timeout.
  • Feat : Waiting a delay in "run_fw_image" to ensure it is really executed.
  • Feat : Returning a error package when get none in "get_module_fw_info".
  • Fix : Using real length to replace fixed number in "block_write_epl" function.

Motivation and Context

  • I2C of transceiver might NACK or stretching when FW upgrade, assuming "None" means "CdbIsBusy" until timeout.
  • "run_fw_image" will be executed after a delay which according to run command, waiting the delay in "run_fw_image" to avoid sending another command before it really be executed.
  • CDB commands will maybe cause few seconds NACK or stretching on i2c bus depend on implementation of module, handling this situation for compatible with different implementation.
  • To avoid a wrong epl length used in module.

- Description
cdb1_chkstatus will crash when i2c NACK or timeout.

- Motivation and Context
I2C of transceiver might NACK or stretching when FW upgrade, assuming "None" means "CdbIsBusy" until timeout.
- Description
Waiting a delay in "run_fw_image" to ensure it is really executed.
Return a special package when get none in "get_module_fw_info".

- Motivation and Context
"run_fw_image" will be executed after a delay which according to run cmd, waiting the delay in "run_fw_image" to avoid aother cmd sent before it really executing.
CDB cmds will maybe cause several seconds NACK or stretching on i2c bus depend on implementation of module vendor, handling this situation for compatible with different implementation.
- Description
Using real length to replace fixed number in "block_write_epl" function.

- Motivation and Context
To avoid a wrong epl length used in module.
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 2, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@aravindmani-1
Copy link
Contributor

Could you please upload Unit Test logs?.

@CliveNi
Copy link
Contributor Author

CliveNi commented Sep 5, 2022

Could you please upload Unit Test logs?.

It doesn't support to attach .XML file, please change the extension by yourself.
test_cmis-results.txt
test_cmisCDB-results.txt

aravindmani-1
aravindmani-1 previously approved these changes Sep 7, 2022
@aravindmani-1
Copy link
Contributor

@prgeor could you please review this PR?.

Copy link
Contributor

@aravindmani-1 aravindmani-1 left a comment

Choose a reason for hiding this comment

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

It'd be better if you could get the UT logs done inside the switch.

@prgeor prgeor added the CMIS label Sep 7, 2022
@prgeor prgeor self-assigned this Sep 7, 2022
@prgeor
Copy link
Collaborator

prgeor commented Sep 7, 2022

@CliveNi can you check the code coverage failure

Test : Creating "get_module_fw_info" test.
@CliveNi
Copy link
Contributor Author

CliveNi commented Sep 8, 2022

@CliveNi can you check the code coverage failure

Done, attachment is new UT log.
test_cmis-results.txt

@prgeor prgeor merged commit 6f30c0f into sonic-net:master Sep 23, 2022
yxieca pushed a commit that referenced this pull request Mar 1, 2023
* [Cloudlight] QSFP-DD FW upgrade doesn't work (#257)

- Description
cdb1_chkstatus will crash when i2c NACK or timeout.

- Motivation and Context
I2C of transceiver might NACK or stretching when FW upgrade, assuming "None" means "CdbIsBusy" until timeout.

* [Cloudlight] QSFP-DD FW upgrade doesn't work (#257)

- Description
Waiting a delay in "run_fw_image" to ensure it is really executed.
Return a special package when get none in "get_module_fw_info".

- Motivation and Context
"run_fw_image" will be executed after a delay which according to run cmd, waiting the delay in "run_fw_image" to avoid aother cmd sent before it really executing.
CDB cmds will maybe cause several seconds NACK or stretching on i2c bus depend on implementation of module vendor, handling this situation for compatible with different implementation.

* [Cloudlight] QSFP-DD FW upgrade doesn't work (#257)

- Description
Using real length to replace fixed number in "block_write_epl" function.

- Motivation and Context
To avoid a wrong epl length used in module.

* Update unit tests for cmis.

Test : Creating "get_module_fw_info" test.
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.

5 participants