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

[Fishbones/phalanx] Update switchboard driver to fix kernel panic #135

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

pphuchar
Copy link
Collaborator

- What I did
Fix kernel panic removing switcboard_fpga module while XCVR is accessing. While removing the module, invalid kernel object removal causes NULL pointer dependencies left in the kernel, and a function trying to access it causes kernel exception.

PLATFORMS: Phalanx, Fishbone32, and Fishbone48.

- How I did it
The NULL pointer condition check is added to i2c-access functions. If NULL is found, a function will not perform I2c operation and exit with ESHUTDOWN status indicates that the adapter is not ready to use (suspended).
Changes applied to followings functions:

  • i2c_wait_stop()
  • i2c_wait_ack()
  • smbus_access()
  • fpga_i2c_access()

- How to verify it

  1. Boot up SONIC. Makes sure SONiC works normally.
  2. Start 10 threads of sfputil show eeprom
  3. Remove the switchboard_fpga with modprobe -r switchboard_fpga.
  4. No error about the switchboard_fpga module.
  5. No kernel panic happens.

JIRA: CAFP-139

- Description for the changelog

  • Fix kernel panic while removing the switchboard kernel module.

 * Fix kernel panic while removing switchboard_fpga.
@pphuchar pphuchar added the bug Something isn't working label Feb 19, 2020
Copy link

@xwang9 xwang9 left a comment

Choose a reason for hiding this comment

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

it's fine for me.

@tiantianlv tiantianlv merged commit 16d771b into 201811_cel Feb 20, 2020
mudsut4ke pushed a commit that referenced this pull request Jan 25, 2021
a659219 [SONIC_SFP] adding abstract methods for reading and writing the eeprom address space within platform api (#126)
848f4a6 Add third-party licenses (#138)
c2ecd9a Add license file (#137)
403747a [sonic-platform-common] Add new platform API for SONiC Physical MIB Extension feature (#134)
19b8545 [sonic_y_cable] fix the unpacking (#135)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
mudsut4ke pushed a commit that referenced this pull request Jan 25, 2021
…it test issue (sonic-net#6247)

e6c786b [xcvrd] Fix unit test issue with Python 3 (#135)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants