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

[AS9716-32D]Support multi PSU SN in PDDF #8214

Merged
merged 2 commits into from
Jul 24, 2021

Conversation

jostar-yang
Copy link
Contributor

@jostar-yang jostar-yang commented Jul 19, 2021

Why I did it

AS9716-32D PSU. So need DRV to support it.

How I did it

Add needed code to pddf_custom_psu.c to deal with multi PSU and get SN.

How to verify it

Plugin new PSU (3Y) and test,

root@sonic:/sys/bus/i2c/drivers/psu/9-0050# cat psu_serial_num
S0A000X601919000013
root@sonic:/sys/bus/i2c/drivers/psu/9-0050# cat psu_model_name
YESM1300AM
root@sonic:/home/admin# pddf_psuutil mfrinfo
PSU    Status    Manufacturer ID    Model       Serial                Fan Airflow Direction
-----  --------  -----------------  ----------  --------------------  -----------------------
PSU1   NOT OK    3Y POWER           YESM1300AM  S0A000X601919000007  exhaust
PSU2   OK        3Y POWER           YESM1300AM  S0A000X601919000013  exhaust

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

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


access_psu_model_name.show = pddf_get_custom_psu_model_name;
access_psu_model_name.do_get = NULL;

printk(KERN_ERR "pddf_custom_psu_init\n");
Copy link
Contributor

Choose a reason for hiding this comment

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

This print can be removed or made as a debug print

@lguohan lguohan merged commit 3e7228d into sonic-net:master Jul 24, 2021
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
Add needed code to pddf_custom_psu.c to deal with multi PSU and get SN.

How to verify it
Plugin new PSU (3Y) and test,

```
root@sonic:/sys/bus/i2c/drivers/psu/9-0050# cat psu_serial_num
S0A000X601919000013
root@sonic:/sys/bus/i2c/drivers/psu/9-0050# cat psu_model_name
YESM1300AM
root@sonic:/home/admin# pddf_psuutil mfrinfo
PSU Status Manufacturer ID Model Serial Fan Airflow Direction

PSU1 NOT OK 3Y POWER YESM1300AM S0A000X601919000007 exhaust
PSU2 OK 3Y POWER YESM1300AM S0A000X601919000013 exhaust
```

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants