-
Notifications
You must be signed in to change notification settings - Fork 180
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
Handle page select and remote access check after changing SFP target #462
Conversation
Signed-off-by: Mihir Patel <[email protected]>
@mihirpat1 you test the case where
|
|
||
return True | ||
|
||
def _handle_error_and_restore_target_to_E0(self, error_message): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mihirpat1 this API be rename to _restore_target_E0(). Let the caller print the log errors before calling this. This allows reusing this API in future without throwing error logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor I have addressed this now.
|
||
return True | ||
|
||
def get_firmware_download_target_end(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mihirpat1 nit, rename to get_current_target_end()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mihirpat1 please check if this is tested for
- remote target is already powered off
- remote target is powered off after setting the target > 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prgeor I have addressed this now. I haven't tested the power off scenario though.
@prgeor I have tested the case wherein remote target is removed |
hi @mihirpat1 @prgeor there is a conflict, could you raise separate PR? |
/azp run |
@StormLiangMS Can you please try to cherry pick now since the dependent PR is merged? |
…onic-net#462) * Handle page select and remote access check after changing SFP target Signed-off-by: Mihir Patel <[email protected]> * Addressed PR comments --------- Signed-off-by: Mihir Patel <[email protected]>
Cherry-pick PR to 202305: #468 |
…462) * Handle page select and remote access check after changing SFP target Signed-off-by: Mihir Patel <[email protected]> * Addressed PR comments --------- Signed-off-by: Mihir Patel <[email protected]>
could you update the test result for 202311 @mihirpat1 ? |
@StormLiangMS I have now tested this on 202311. Can you please help to merge this? |
…onic-net#462) * Handle page select and remote access check after changing SFP target Signed-off-by: Mihir Patel <[email protected]> * Addressed PR comments --------- Signed-off-by: Mihir Patel <[email protected]>
…onic-net#462) * Handle page select and remote access check after changing SFP target Signed-off-by: Mihir Patel <[email protected]> * Addressed PR comments --------- Signed-off-by: Mihir Patel <[email protected]>
Cherry-pick PR to 202311: #477 |
…onic-net#462) * Handle page select and remote access check after changing SFP target Signed-off-by: Mihir Patel <[email protected]> * Addressed PR comments --------- Signed-off-by: Mihir Patel <[email protected]>
…462) * Handle page select and remote access check after changing SFP target Signed-off-by: Mihir Patel <[email protected]> * Addressed PR comments --------- Signed-off-by: Mihir Patel <[email protected]>
…mpty slot issue (sonic-net#462) * [chassis][linecard] Fix Module LINECARD<> went off-line message for empty slot issue Signed-off-by: mlok <[email protected]> * Define/use get_module_current_status() --------- Signed-off-by: mlok <[email protected]> Co-authored-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
Description
After changing the target to remote, many sfputil commands which access transceiver EEPROM fail with the below traceback if either of the below scenario is true.
Traceback details
Motivation and Context
The set_firmware_download_target_end API needs to be enhanced since it currently
https://github.com/opencomputeproject/OpenNetworkLinux/blob/e85f118fb6400caf869f4a83b92c0bc3123962da/packages/base/any/kernels/modules/optoe.c#L522
If either of the above scenario is true, when sfputil or xcvrd attempts reading the Vendor name and Vendor part number (residing an Upper page 0h) to create the relevant transceiver specific instances (
sonic-platform-common/sonic_platform_base/sonic_xcvr/xcvr_api_factory.py
Line 72 in de16e50
#1
, the data of upper page will be actually read from the corresponding non-zero page selected#2
, all registers of EEPROM except TARGET_MODE register will have a value of 0xff populatedIn addition to the above changes, the
get_current_target_end
API has been added for future use.How Has This Been Tested?
Following test cases were executed
Additional Information (Optional)
MSFT ADO - 27920899