| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
If the devation is less than zero, treat as an absolute minimum RPM value
|
|
|
|
|
|
|
|
|
| |
This change is mostly focused around plumbing the sdeventplus::Event
object everywhere and using the member functions provided for the event.
No migration to the timer utility is performed yet.
Change-Id: I912ab82bc081239d3b7c3cf7c5caca6742ef9c87
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update to start all tach sensor functional state change timers on a fan
where the corresponding state and inventory is updated when the timer
expires.
Only start the timer in nonfunctional mode when a tach sensor is out of
range and is currently functional and start the functional mode timer
when its in range and currently nonfunctional.
Tested:
Tach sensors are marked nonfunctional as normal.
Tach sensors are updated to functional after 5sec(yaml test value)
Nonfunctional timer is cancelled if fan returns within spec
Functional timer is cancelled if fan returns out of spec
Change-Id: I88622d07d8713f88e8070940a4bd96046a053fb5
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a single timer on the tach sensors for delaying both nonfunctional
and functional state changes by declaring what mode the timer is in.
Since a fan is either transitioning from a functional state to a
nonfunctional state or vice-versa, enabling the timer in the mode
requested allows the user to define a delay for both of these transition
states.
Tested: Current nonfunctional timer delay operates the same
Change-Id: I0c165355d41d27e1906918953e5226968062ee16
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add ability to define a delay to marking a tach sensor as functional
when it transitions from a nonfunctional state. Essentially this gives
the option to wait a given amount of time that a tach sensor must be
within the allowed deviation before being updated to functional.
Default functional delay = 0 seconds
Tested: Current fan definition values function the same
Change-Id: I58bf70d2335e27c06037b755cbee8dae81528a5a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fan and trust group objects should utilize shared pointers to the
tach sensor objects. This allows optimizing the storage of additional
attributes associated with the tach sensors.
e.g. An attribute to declare which sensors should be included in the
trust determination.
Tested: Current trust group associations & reactions are unchanged
Change-Id: I249cc7debf467e8275fae7fa157ce97078b40802
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current fan monitor assumes the use of the FanSpeed interface for fan
targets.
For fans controlled by pwm, FanPwm interface is added.
This commit adds a "target_interface" config parameter, so that user
can specify the interface for the fan targets.
E.g.
- name: fan0
has_target: true
target_interface: xyz.openbmc_project.Control.FanPwm
This config is optional and defaults to FanSpeed, so the current code
will not be affected.
Tested: Use this config on Romulus, ensures fan monitor gets fan
target from FanPwm interface and works OK.
Change-Id: I262a486c335b2b43a46af7abdd0e71e95a133b98
Signed-off-by: Lei YU <mine260309@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For fans controlled via pwm, the fan target and speed are different,
where the fan target is pwm and the speed is rpm.
Usually it is a linear mapping from pwm to rpm.
So this commit defines the optional configs, factor and offset for
calculating the expected fan speed from target, e.g.
- name: fan0
has_target: true
factor: 21
offset: 1600
The fan monitor service will calculate expected fan speed as:
target * factor + offset
The default value is 1 for factor and 0 for offset if they are not
defined.
Tested: Use this config together with the following commit's changes,
test on Romulus and ensures the fan monitor works OK;
Without this config, fan monitor always mark fans as
non-functional due to the fan speed does not match the pwm
value.
Change-Id: If5e25368b4530df7a7face9377efb58804db21df
Signed-off-by: Lei YU <mine260309@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
With the addition of a functional state for each fan rotor tach sensor,
these should be set to functional on each power on. This is done during
fan monitor init mode when no monitor is done and then again once
monitoring mode begins.
Change-Id: I3c73c1be5f912c7cee8499f47cc799ac3c20983b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
The getTargetSpeed function is no longer needed. The tach sensors are
used to get the target speed.
Change-Id: I5f82b0c3e8104203e2700b22a5488cf63673d181
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All tach sensors associated with a fan should return a target speed
sensor from its getTarget function. In the case where a target speed
sensor does not exist for the tach sensor, it retrieves and returns the
target speed value from the fan where the fan finds the target speed
value from a tach sensor the fan contains that provides it.
Resolves openbmc/openbmc#2784
Change-Id: Iea5561b0aad6942be52af262c7255c60e5e75c7a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Use the methods provided within sdbusplus.hpp to update fan inventory
along with prepping inventory to be updated for each fan rotor sensor's
functional state.
Change-Id: I7d3026d289b1dd22cd4e7b4457c4d4396309c0b5
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
The Fan class now uses the trust::Manager class
to ask if a sensor value is trusted before analyzing
its value against the upper and lower limits.
Change-Id: I81dd468877873ba84753d76395b4a59129824c0b
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Upcoming commits will touch the TachSensor timer
outside of the Fan class, and it will be cleaner to
encapsulate the operations in TachSensor.
Change-Id: I8584c44eb5dbe6bb93191a006d20dfc37596eeb3
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allowing fan monitor to run in an init mode will set the fans to a
functional state at each poweron for fans that were non-functional at
poweroff. Then fan monitor can be started in monitor mode after the fans
have ramped up to full speed and can begin being monitored for faults.
This also allows for the removal of fan monitor doing a sd_notify prior
to fan control starting.
Change-Id: I634c9b4ec8bb30860dea54c8abd1cd6c56831d25
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Don't count sensors that don't exist as nonfunctional. Let some
other application decide if missing sensors are a problem or not.
Change-Id: Ie3d438c92df16bfd86ddc86db8a9dd143bf2cfb0
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
| |
When a fan gets set to nonfunctional, it is useful
to know how fast the rotor was actually going and
what the expected speed was.
Change-Id: I760d6fa7d193038f9740d241bf4d4d0039020f64
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Implemented elog exception for phosphor fan presence,
replacing runtime_errors.
Change-Id: I70465060838b2cbaeadccf84ed5924e222ac59e3
Signed-off-by: Dinesh Chinari <chinari@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Convert the sd_event object wrapper from a shared_ptr to
a unique_ptr. Requires a new header file.
Change-Id: I868a9e88ed93878c2e0bb12e58f8d3a604510da0
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Set a fan's Functional property to false when
it has been out of spec for too long. When it
is back in spec, set it back to functional.
Change-Id: I264129479c58fd296df7c3a1d3d42f5d7aa7b60b
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
In Fan's tachChanged handler, start up the timer
for a sensor if it is running too slow. If it is
within spec, stop the timer if running and make
the sensor functional again if necessary.
Change-Id: Ib18de2b69942d334da0cb8cd4cc4de8a2784efab
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
| |
Add a Timer object to the TachSensor class
Change-Id: I419b5712de9e8e94f2a08de84d13170e44c33c7a
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TachSensor will match on properties changed
signals for the Value and Target properties.
When these occur, it will load in those
properties and then tell the Fan class there
was a change.
Also, TachSensor will read in the Target property
during construction so it will have a valid value
to check against right away.
Change-Id: I2dc2cacf5804826c6b0e0ea91196cbdaa4d5b893
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
A Fan object has one or more TachSensor objects.
The TachSensor class is used to keep track of the
the actual and expected speeds. It only tracks
expected speeds if the _hasTarget attribute is true.
Future commits will add more functionality.
Change-Id: I9bb5fac39f25c5c31c18457ebedf82838fcf6641
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|