<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 12/16/20 8:23 PM, Thu Nguyen wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:7d637357-bc60-032a-712a-cc165d96c573@amperemail.onmicrosoft.com"><!-- BaNnErBlUrFlE-HeAdEr-start -->
      <meta name="viewport" content="width=device-width;
        initial-scale=1.0; maximum-scale=1.0; user-scalable=no;">
      <style>.pfptPreheader { display:none !important; visibility:hidden; mso-hide:all; font-size:1px; line-height:1px; max-height:0px; max-width:0px; opacity:0; overflow:hidden; }</style>
      <!-- BaNnErBlUrFlE-HeAdEr-end -->
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <!-- BaNnErBlUrFlE-BoDy-start -->
      <!-- Preheader Text : BEGIN --> <span class="pfptPreheader"
        style="display:none
!important;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;">
        On 12/17/20 05:03, Matthew Barth wrote: On 12/16/20 2:03 AM,... 
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
              </span>
      <!-- Preheader Text : END -->
      <!-- Email Banner : BEGIN -->
      <table style="width:100%;border-radius:4px;margin-bottom:16px;"
        width="100%" cellspacing="0" cellpadding="16" border="0"
        bgcolor="#9CA3A7">
        <tbody>
          <tr>
            <td align="center">
              <table class="pfptMainWrapper" style="width:100%;"
                width="100%" cellspacing="0" cellpadding="0" border="0"
                align="center">
                <tbody>
                  <tr>
                    <td style="border-radius:4px;" valign="top"
                      align="center">
                      <table style="max-width:100%; width:100%;"
                        width="100%" cellspacing="0" cellpadding="0"
                        border="0" bgcolor="#9CA3A7" align="center">
                        <tbody>
                          <tr>
                            <!-- Message : BEGIN --> <th
                              class="pfptTableColumnLeft"
style="font-weight:normal;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;width:100%;height:auto;"
                              valign="top">
                              <table
                                style="width:100%;height:auto;text-align:left;vertical-align:middle;"
                                width="100%" cellspacing="0"
                                cellpadding="0">
                                <tbody>
                                  <tr>
                                    <td> <span class="pfptTitle"
style="font-family:'Roboto','Helvetica','Arial',sans-serif;font-weight:bold;font-size:18px;line-height:20px;display:block;margin-bottom:4px;word-wrap:normal;">This
                                        Message Is From an External
                                        Sender</span> </td>
                                  </tr>
                                  <tr>
                                    <td> <span class="pfptSubtitle"
style="font-weight:normal;font-family:'Roboto','Helvetica','Arial',sans-serif;font-size:13px;line-height:16px;display:block;word-wrap:normal;">This
                                        message came from outside your
                                        organization.</span> </td>
                                  </tr>
                                </tbody>
                              </table>
                            </th>
                            <!-- Message : END --> </tr>
                        </tbody>
                      </table>
                    </td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
        </tbody>
      </table>
      <!-- Email Banner : END -->
      <!-- BaNnErBlUrFlE-BoDy-end -->
      <div class="moz-cite-prefix">On 12/17/20 05:03, Matthew Barth
        wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:c610636d-bf38-4077-edbf-5e0ad727a3ab@linux.ibm.com"> <br>
        On 12/16/20 2:03 AM, Thu Nguyen wrote: <br>
        <blockquote type="cite">Hi, <br>
          <br>
          <br>
          In the current code of phosphor-hwmon, when flag
          --enable-update-functional-on-fail is set. The fan functional
          DBus property in sensors interface will be set to false when
          unplug fans (FAN4_2). <br>
          <br>
          ~# busctl get-property
          xyz.openbmc_project.Hwmon-1644477290.Hwmon1
          /xyz/openbmc_project/sensors/fan_tach/FAN4_2
          xyz.openbmc_project.State.Decorator.OperationalStatus
          Functional <br>
          b false <br>
          <br>
          AND the fan Value properties will keep the latest reading
          value before unplug. <br>
          <br>
          ~# busctl get-property
          xyz.openbmc_project.Hwmon-1644477290.Hwmon1
          /xyz/openbmc_project/sensors/fan_tach/FAN4_2
          xyz.openbmc_project.Sensor.Value Value <br>
          <br>
          d 4794 <br>
          <br>
          ~# busctl get-property
          xyz.openbmc_project.Hwmon-1644477290.Hwmon1
          /xyz/openbmc_project/sensors/fan_tach/FAN4_2
          xyz.openbmc_project.Sensor.Value Value <br>
          d 4794 <br>
          <br>
          This cause phosphor-fan-monitor failed to detect the fan
          failure so the fan functional are wrong. <br>
          <br>
          busctl get-property xyz.openbmc_project.Inventory.Manager
          /xyz/openbmc_project/inventory/system/chassis/motherboard/FAN4_2
          xyz.openbmc_project.State.Decorator.OperationalStatus
          Functional <br>
          b true <br>
          <br>
          Should phosphor-hwmon keep updating the fan value Dbus
          properties with error code when the fans is nonfunctional? Or
          phosphor-fan-monitor should also check the fan functional in
          sensor interface to update fan functional in inventory
          interface? <br>
          <br>
        </blockquote>
        I recall this was something that would be needed in
        phosphor-fan-monitor when a fan's sensor is marked faulted since
        the value should no longer be trusted by phosphor-fan-monitor. A
        phosphor-fan-monitor configuration option needs to be added per
        fan sensor to check the sensor's functional property and use
        that to update the fan's functional state in inventory as well.
        <br>
        <br>
        Please feel free to submit a patch to add this configuration
        option to drive setting the fan's functional state in inventory
        based on the state of a fan sensor's functional state. <br>
        <br>
        <br>
        Matt <br>
        <br>
        <blockquote type="cite"> <br>
          Regards. <br>
          <br>
          Thu Nguyen. <br>
          <br>
          <br>
          <br>
        </blockquote>
      </blockquote>
      <p>How about Fan Present property? Should we update it to false
        when fan sensor functional is false?</p>
    </blockquote>
    No. These are states with different meanings...a fan's present state
    should not be associated with a fan sensor's functional state. There
    is a case where these may be linked when the sensor device is
    included in the fan FRU itself, however, I would see them being
    handled by their respective applications to update those different
    states accordingly anyways.<br>
    <blockquote type="cite"
cite="mid:7d637357-bc60-032a-712a-cc165d96c573@amperemail.onmicrosoft.com">
      <p>I think we can add option
        "fan_sensor_func_to_fan_inventory_func" in fan configuration as
        below:</p>
      <div style="color: #d4d4d4;background-color: #1e1e1e;font-family: Menlo, Monaco, 'Courier New', monospace;font-weight: normal;font-size: 18px;line-height: 27px;white-space: pre;"><div><span style="color: #d4d4d4;">  - </span><span style="color: #569cd6;">inventory</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">/system/chassis/motherboard/FAN3_1</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #569cd6;">allowed_out_of_range_time</span><span style="color: #d4d4d4;">: </span><span style="color: #b5cea8;">30</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #569cd6;">deviation</span><span style="color: #d4d4d4;">: </span><span style="color: #b5cea8;">15</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #569cd6;">num_sensors_nonfunc_for_fan_nonfunc</span><span style="color: #d4d4d4;">: </span><span style="color: #b5cea8;">1</span></div><div><span style="color: #d4d4d4;">    fan_</span><span style="color: #569cd6;">sensor_func_to_fan_inventory_func</span><span style="color: #d4d4d4;">: </span><span style="color: #569cd6;">true</span></div><div><span style="color: #d4d4d4;">    </span><span style="color: #569cd6;">sensors</span><span style="color: #d4d4d4;">:</span></div><div><span style="color: #d4d4d4;">      - </span><span style="color: #569cd6;">name</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">FAN3_1</span></div><div><span style="color: #d4d4d4;">        </span><span style="color: #569cd6;">has_target</span><span style="color: #d4d4d4;">: </span><span style="color: #569cd6;">true</span></div><div><span style="color: #d4d4d4;">        </span><span style="color: #569cd6;">target_interface</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">xyz.openbmc_project.Control.FanPwm</span></div><div><span style="color: #d4d4d4;">        </span><span style="color: #569cd6;">factor</span><span style="color: #d4d4d4;">: </span><span style="color: #b5cea8;">82</span></div><div><span style="color: #d4d4d4;">        </span><span style="color: #569cd6;">offset</span><span style="color: #d4d4d4;">: </span><span style="color: #b5cea8;">0</span></div></div>
      <p>In phosphor-fan-monitor, for each fan, we will signal the fan
        functional property in sensor, and update the fan function in
        inventory when that property is changed. Maybe we should update
        fan present in inventory also.</p>
    </blockquote>
    <p>I'd prefer this to be the default and provide a configuration
      option to decouple the fan rotor's functional state from the state
      of its associated sensor(s). In most cases, the sensor being
      nonfunctional should therefore set the fan rotor's functional
      state to nonfunctional when the configuration option to disable
      this association is not given. This optional configuration to
      disable the sensor-to-fan rotor functional association should be
      supported for each sensor listed per fan in the fan monitor
      configuration file.</p>
    <p><br>
    </p>
    <p>Matt<br>
    </p>
    <blockquote type="cite"
cite="mid:7d637357-bc60-032a-712a-cc165d96c573@amperemail.onmicrosoft.com">
      <p><br>
      </p>
      <p>Thu Nguyen<br>
      </p>
    </blockquote>
  </body>
</html>