fboss icon indicating copy to clipboard operation
fboss copied to clipboard

[Meru800] General PM & Sensor config updates and clean up

Open aalamsi22 opened this issue 1 year ago • 5 comments

Description

  • Symlinks are now organized in the following order for each PMUnit starting from root:
    • Fpgas
    • I2c Buses
    • SMB Idrpom
    • I2c devices
    • Embedded sensors
    • Xcvrs
    • Spi Devices
  • Meru800BFA: Added symlinks to spi devices
  • Sensor service configs are sorted based on the order of i2c devices they’re on
  • Removed symlink for "/[IDPROM]" on Meru800BIA as PM handles creating the symlink without a config for it.
  • Meru800BIA now uses the lm75 driver instead of tmp75. The tmp75 driver is not compatible with some of the parts sourced from some vendors which can cause unexpected behavior. The lm75 is a more general driver and avoids any part specific configurations.
  • PM configs updated to configure temp sensors overtemp limits

Test

Meru800BFA:

  • Flash devices symlinks
# ls -al /run/devmap/flashes/
total 0
drwxr-xr-x 2 root root 140 Aug 27 17:52 .
drwxr-xr-x 9 root root 180 Aug 27 17:13 ..
lrwxrwxrwx 1 root root  17 Aug 27 17:52 SMB_SPI0_MASTER0_DEVICE1 -> /dev/spidev2005.0
lrwxrwxrwx 1 root root  17 Aug 27 17:52 SMB_SPI1_MASTER0_DEVICE1 -> /dev/spidev3005.0
lrwxrwxrwx 1 root root  17 Aug 27 17:52 SMB_SPI2_MASTER0_DEVICE1 -> /dev/spidev4005.0
lrwxrwxrwx 1 root root  17 Aug 27 17:52 SMB_SPI3_MASTER0_DEVICE1 -> /dev/spidev5005.0
lrwxrwxrwx 1 root root  17 Aug 27 17:13 SMB_SPI_MASTER0_DEVICE1 -> /dev/spidev5005.0
  • PM initializes successfully. Some "failures" are reported but are not caused by this PR.
    • Wrong FAN CPLD firmware version path. The version files are located under hwmon directories that the check omits. . Likely introduced by https://github.com/facebook/fboss/commit/77d10bcfbcc2299542475d906cd38f3addccc028
    • Known failure logs due to SCM_IDPROM_P1
 Failed to open firmware version file /run/devmap/cplds/FAN0_CPLD/cpld_ver: No such file or directory
 Failed to open firmware version file /run/devmap/cplds/FAN0_CPLD/cpld_sub_ver: No such file or directory
 Reporting firmware version for FAN0_CPLD - version string:0.0 ODS value:0
 Failed to open firmware version file /run/devmap/cplds/FAN1_CPLD/cpld_ver: No such file or directory
 Failed to open firmware version file /run/devmap/cplds/FAN1_CPLD/cpld_sub_ver: No such file or directory
 Reporting firmware version for FAN1_CPLD - version string:0.0 ODS value:0
 Failed to open firmware version file /run/devmap/cplds/FAN2_CPLD/cpld_ver: No such file or directory
 Failed to open firmware version file /run/devmap/cplds/FAN2_CPLD/cpld_sub_ver: No such file or directory
 Reporting firmware version for FAN2_CPLD - version string:0.0 ODS value:0
 Reporting firmware version for MERU800BFA_SMB_CPLD - version string:4.4 ODS value:4004
 Reporting firmware version for MERU800BFA_SMB_FPGA0 - version string:1.19 ODS value:1019
 Reporting firmware version for MERU800BFA_SMB_FPGA1 - version string:1.19 ODS value:1019
 Reporting firmware version for MERU800BFA_SMB_FPGA2 - version string:1.26 ODS value:1026
 Reporting firmware version for MERU800BFA_SMB_FPGA3 - version string:1.23 ODS value:1023
 Reporting firmware version for MERU_SCM_CPLD - version string:4.13 ODS value:4013
 Completed setting up devices with errors
 Failures in PmUnit SCM at /
 1. Failed to create i2c device for SCM_IDPROM_P1 (24c512) at bus: 3, addr: 0x50 with exit status 0
 2. Failed to create a symlink /run/devmap/eeproms/MERU_SCM_EEPROM_P1 for DevicePath /[SCM_IDPROM_P1]. Reason: SCM_IDPROM_P1 is not plugged-in to the platform
  • sensor_service
========================================================
Processed 147 Sensors. 0 Failures.
Using thread manager (resource pools not enabled) on address/port 5970: runtime: thriftFlagNotSet, , thrift flag: false, enable gflag: false, disable gflag: false
Processed 147 Sensors. 0 Failures.
Processed 147 Sensors. 0 Failures.
Processed 147 Sensors. 0 Failures.

Meru800BIA:

  • PM initializes successfully. Some "failures" are reported but are not caused by this PR.
    • Wrong FAN CPLD firmware version path. The version files are located under hwmon directories that the check omits. Likely introduced by https://github.com/facebook/fboss/commit/77d10bcfbcc2299542475d906cd38f3addccc028
    • Known failure logs due to SCM_IDPROM_P1
Failed to open firmware version file /run/devmap/cplds/FAN_CPLD/cpld_ver: No such file or directory
Failed to open firmware version file /run/devmap/cplds/FAN_CPLD/cpld_sub_ver: No such file or directory
Reporting firmware version for FAN_CPLD - version string:0.0 ODS value:0
Reporting firmware version for MERU800BIA_SMB_FPGA - version string:4.13 ODS value:4013
Reporting firmware version for MERU_SCM_CPLD - version string:4.13 ODS value:4013
Completed setting up devices with errors
Failures in PmUnit SCM at /
1. Failed to create i2c device for SCM_IDPROM_P1 (24c512) at bus: 3, addr: 0x50 with exit status 0
2. Failed to create a symlink /run/devmap/eeproms/MERU_SCM_EEPROM_P1 for DevicePath /[SCM_IDPROM_P1]. Reason: SCM_IDPROM_P1 is not plugged-in to the platform

aalamsi22 avatar Aug 17 '24 02:08 aalamsi22

@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Aug 24 '24 15:08 facebook-github-bot

@aalamsi22 How was this tested? You must have tested it to verify that the path can get created and also ensure that new sensors output reflect the change.

Can you please add the log output that shows the new path under /run/devmap as well as anything else that reflect other changes?

For every PR, you need to share with us the output that you see that tells you it's working as expected. This makes the PR easier to review and maintain. Thanks!

joancaneus avatar Aug 24 '24 21:08 joancaneus

@aalamsi22 has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Sep 16 '24 16:09 facebook-github-bot

@aalamsi22 has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Sep 16 '24 23:09 facebook-github-bot

@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Sep 17 '24 21:09 facebook-github-bot

@aalamsi22 has updated the pull request. You must reimport the pull request before landing.

facebook-github-bot avatar Sep 18 '24 20:09 facebook-github-bot

@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Sep 19 '24 00:09 facebook-github-bot

@joancaneus merged this pull request in facebook/fboss@c4e5a103e80b69c59f1adbfe9966cd9d6efda8b7.

facebook-github-bot avatar Sep 19 '24 04:09 facebook-github-bot