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

[Ragile/Platform] kernel 5.10 adaptation and framework optimization #14465

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

pettershao-ragilenetworks
Copy link
Contributor

@pettershao-ragilenetworks pettershao-ragilenetworks commented Mar 30, 2023

Why I did it

kernel 5.10 adaptation and framework optimization

How I did it

kernel 5.10 adaptation and framework optimization

How to verify it

show version
docker ps -a
show platform syseeprom
show platform fan
show platform psustatus
show platform temperature
show platform firmware status
show platform ssdhealth
show interface status
show interface transceiver presence
show interface transceiver eeprom
show environment
sensors
sudo show system-health detail

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • master

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@pettershao-ragilenetworks pettershao-ragilenetworks changed the title Adapt kernel 5.10 for broadcom on the master branch [Platform/Ragile]Adapt kernel 5.10 for broadcom on the master branch Apr 6, 2023
@pettershao-ragilenetworks
Copy link
Contributor Author

There is no defaultxml in this SONiC OS, so we can ignore the error message of semgrep.

device/ragile/x86_64-ragile_ra-b[65](https://github.com/sonic-net/sonic-buildimage/actions/runs/4562122647/jobs/8048918057?pr=14465#step:4:66)10-32c-r0/monitor.py 
     python.lang.security.use-defused-xml.use-defused-xml
        The Python documentation recommends using `defusedxml` instead of `xml` because the native
        Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can
        leak confidential data and "XML bombs" can cause denial of service.
        Details: https://sg.run/kX47

          7┆ import xml.etree.ElementTree as ET

@pettershao-ragilenetworks pettershao-ragilenetworks marked this pull request as ready for review April 7, 2023 01:47
@pettershao-ragilenetworks
Copy link
Contributor Author

@qiluo-msft @lguohan @xumia Can you please review this pr?

@pettershao-ragilenetworks pettershao-ragilenetworks changed the title [Platform/Ragile]Adapt kernel 5.10 for broadcom on the master branch [Ragile]Adapt kernel 5.10 for broadcom on the master branch Apr 11, 2023
Signed-off-by: pettershao-ragilenetworks <pettershao@ragilenetworks.com>
@pettershao-ragilenetworks pettershao-ragilenetworks changed the title [Ragile]Adapt kernel 5.10 for broadcom on the master branch [Ragile/Platform] kernel 5.10 adaptation and framework optimization Apr 20, 2023
@@ -0,0 +1,236 @@
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Hardware monitoring driver for PMBus devices
Copy link
Collaborator

Choose a reason for hiding this comment

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

there are too many kernel drivers which included in the 5.10 kernel. we should use vanilla kernel driver.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The drivers(in the common/modules/linux-5.10 directory)were revised based on kernel native drivers to solve below problems:

  1. wb_at24.c is revised based on the at24.c, adding AT24_FLAG_IRUGO flag for EEPROM's flag to enable none root users' read access, solving the problem of none root users throwing exceptions when executing the show command
  2. wb_i2c_algo_bit.c is revised based on the i2c-algo-bit.c, adding I2C level detection and 9 clock functions to improve I2C reliability
  3. wb_i2c_i801.c is revised based on the i2c-i801.c, adding controller reset and 9 clock functions to improve I2C reliability
  4. wb_i2c_mux_pca954x.c is revised based on the i2c-mux-pca954x.c, adding 9548 reset function to improve I2C reliability

@lguohan
Copy link
Collaborator

lguohan commented Apr 21, 2023

too many changes, please split the PR into multiple smaller PRs.

@pettershao-ragilenetworks
Copy link
Contributor Author

too many changes, please split the PR into multiple smaller PRs.

OK

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.

2 participants