History log of /openbmc/phosphor-fan-presence/control/json/utils/pcie_card_metadata.hpp (Results 1 – 4 of 4)
Revision Date Author Comments
# 4fa67aa1 03-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: If152304b21dd2daaa2f79255a4f98218615efb05
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: If152304b21dd2daaa2f79255a4f98218615efb05
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 3d0c3696 12-Dec-2024 Matt Spinler <spinler@us.ibm.com>

control: Load only 1 pcie_cards.json

The pcie_cards.json file contains PCIe cards that need special fan floor
values. The previous code would attempt to load multiple files, based
on the thinking t

control: Load only 1 pcie_cards.json

The pcie_cards.json file contains PCIe cards that need special fan floor
values. The previous code would attempt to load multiple files, based
on the thinking that there might be a common file that is shared between
systems and then other system specific files with just the cards that
are different.

In practice this feature was never used, and made systems harder to
patch in /etc/ since even after a file was found in /etc the file would
also be loaded out of /usr, overwriting the values.

Tested:
A file was put in each non default location of:

```
/etc/phosphor-fan-presence/control/
/etc/phosphor-fan-presence/control/com.ibm.Hardware.Chassis.Model.Rainier4U/

/usr/share/phosphor-fan-presence/control/
/usr/share/phosphor-fan-presence/control/com.ibm.Hardware.Chassis.Model.Rainier/
```

With the existing file in flash at:
/usr/share/ ... /com.ibm.Hardware.Chassis.Model.Rainier4U/

And in each case the correct file was chosen. Verified using the traces
shown on startup like:

```
Loading configuration from /etc/phosphor-fan-presence/control/pcie_cards.json
```

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I14b849a2bff65402508ef92e293f3237729721e5

show more ...


# 9b06243d 26-Jan-2023 Matt Spinler <spinler@us.ibm.com>

Add explicit keyword to 1 arg constructors

The cppcheck tool complains about it otherwise.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Id977a6c349b0b49354b52ac994ea7742e0a39307


# e9d33b65 09-Nov-2021 Matt Spinler <spinler@us.ibm.com>

control: PCIe card metadata wrapper class

This class introduces a PCIeCardMetadata class to manage JSON files
containing PCIe card floor indexes. These can then be used by actions
that want to set t

control: PCIe card metadata wrapper class

This class introduces a PCIeCardMetadata class to manage JSON files
containing PCIe card floor indexes. These can then be used by actions
that want to set the fan floors based on which PCIe cards are present.

It provides a lookup() method that takes four properties from the
PCIeDevice D-Bus interface to uniquely identify a card, and then returns
the floor index for the card if it doesn't have a temperature sensor on
it, or the 'has temp sensor' value which will be true.

The code first loads /etc/phosphor-fan-presence/control/pcie_cards.json
if it exists. If that isn't present, it then tries
/usr/share/phosphor-fan-presence/control/pcie_cards.json. After
that, it tries
/usr/share/phosphor-fan-presence/control/<system-name>/pcie_cards.json
where <system-name> comes from the list of system names passed into
the constructor.

It will overwrite any file entries that match as it goes on, so if a
system has to override just a few of the floor indexes from a more
generic file it can be done without having to duplicate entries for
cards that are the same.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I81f2476dd58d1529ee6484243e7d8f1e49027cf9

show more ...