Skip to content

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

Merged
lguohan merged 2 commits intosonic-net:masterfrom
jostar-yang:as9716_20210719_multi_psu
Jul 24, 2021
Merged

[AS9716-32D]Support multi PSU SN in PDDF#8214
lguohan merged 2 commits intosonic-net:masterfrom
jostar-yang:as9716_20210719_multi_psu

Conversation

@jostar-yang
Copy link
Copy Markdown
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)

@jostar-yang jostar-yang requested a review from lguohan as a code owner July 19, 2021 06:58
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
Copy Markdown
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