diff options
author | Tom Joseph <tomjoseph@in.ibm.com> | 2018-07-31 23:00:24 +0530 |
---|---|---|
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | 2018-08-08 21:07:02 +0000 |
commit | bed2699f47c34aa547f85e8d66d50df21be12a0a (patch) | |
tree | adda97a0fd93360f347c2830c371573f42c7d9be | |
parent | 28565ac3f2585b4088025833405789645e1b774f (diff) | |
download | phosphor-host-ipmid-bed2699f47c34aa547f85e8d66d50df21be12a0a.tar.gz phosphor-host-ipmid-bed2699f47c34aa547f85e8d66d50df21be12a0a.zip |
Handle the case to turn off the Chassis Identify LED
Resolves openbmc/openbmc#3327
Change-Id: Ib0cbfccdd91b6cdd2267a48b312d2736a4ce8fbc
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
-rw-r--r-- | chassishandler.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chassishandler.cpp b/chassishandler.cpp index 04bbffe..2ad9948 100644 --- a/chassishandler.cpp +++ b/chassishandler.cpp @@ -1190,6 +1190,7 @@ ipmi_ret_t ipmi_chassis_identify(ipmi_netfn_t netfn, ipmi_cmd_t cmd, DEFAULT_IDENTIFY_TIME_OUT; bool forceIdentify = (*data_len == chassisIdentifyReqLength) ? (static_cast<uint8_t*>(request))[forceIdentifyPos] & 0x01 : false; + if (identifyInterval || forceIdentify) { // stop the timer if already started, for force identify we should @@ -1214,6 +1215,11 @@ ipmi_ret_t ipmi_chassis_identify(ipmi_netfn_t netfn, ipmi_cmd_t cmd, std::chrono::seconds(identifyInterval)); identifyTimer->startTimer(time); } + else if (!identifyInterval) + { + identifyTimer->setTimer(SD_EVENT_OFF); + enclosureIdentifyLedOff(); + } return IPMI_CC_OK; } |