From bed2699f47c34aa547f85e8d66d50df21be12a0a Mon Sep 17 00:00:00 2001 From: Tom Joseph Date: Tue, 31 Jul 2018 23:00:24 +0530 Subject: Handle the case to turn off the Chassis Identify LED Resolves openbmc/openbmc#3327 Change-Id: Ib0cbfccdd91b6cdd2267a48b312d2736a4ce8fbc Signed-off-by: Tom Joseph --- chassishandler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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(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; } -- cgit v1.2.1