-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Dell] S6000 I2C not responding to certain optics #8736
Conversation
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.
@santhosh-kt please address comment
@@ -72,10 +74,19 @@ def get_presence(self, port_num): | |||
if port_num < self.port_start or port_num > self.port_end: | |||
return False | |||
|
|||
try: |
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.
why is qsfp_modprs pin access needs a lock? Reading of sysfs entry shouldn't need lock. I see this https://github.com/Azure/sonic-buildimage/blob/master/platform/broadcom/sonic-platform-modules-dell/s6000/modules/dell_s6000_platform.c#L286 already thread safe.
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.
Lock is provided for writing qsfp_modsel register.
When multiple ports are enabled via qsfp_modsel register, we observed that qsfp_modprs values are being wrong. At a time only one port should be enabled in qsfp_modsel.
platform/broadcom/sonic-platform-modules-dell/s6000/sonic_platform/sfp.py
Show resolved
Hide resolved
|
||
return modsel_state | ||
|
||
def set_modsel(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.
If you bring the lock inside set_modsel(), then you don't have to lock/unlock every place where set_modsel() is called, keeps code changes to minimum.
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.
The lock is based on set_modsel() but we cant introduce it here.
A scenario:
- When sfputil tries to read a port, it checks for modprs register and to read that we are setting modsel register.
- Before we actually reading modprs register, if pmon docker or any other process trying to set modsel register then it will have the race condition here.
- To avoid this we are locking before modsel register is being set and releasing the lock only after the requirements are over(In our case after retriving modprs register).
* [Dell] S6000 I2C not responding to certain optics * Revising return states * Moved lock file from /var/run/platform_cache to /etc/sonic
Why I did it
How I did it
On branch Master
Your branch is up to date with 'origin/Master'.
Changes to be committed:
(use "git restore --staged ..." to unstage)
modified: device/dell/x86_64-dell_s6000_s1220-r0/plugins/sfputil.py
modified: platform/broadcom/sonic-platform-modules-dell/s6000/modules/dell_s6000_platform.c
modified: platform/broadcom/sonic-platform-modules-dell/s6000/scripts/s6000_platform.sh
modified: platform/broadcom/sonic-platform-modules-dell/s6000/sonic_platform/sfp.py
How to verify it
Which release branch to backport (provide reason below if selected)
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)