Skip to content

Commit 547e379

Browse files
ploetzmaA. Patrick Williams III
authored andcommitted
Change the way we handle response to chassis power cycle
Change-Id: I7cb62670fe4b1ce900d0bd2a03061248d5123cc0 RTC:131615 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19148 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
1 parent efdd6c5 commit 547e379

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/include/usr/ipmi/ipmiif.H

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ namespace IPMI
6262
CHASSIS_POWER_OFF = 0x00,
6363
CHASSIS_POWER_SOFT_RESET = 0x01,
6464
CHASSIS_POWER_CYCLE = 0x02,
65+
CHASSIS_POWER_RESET = 0x03,
6566
};
6667

6768
// Used in the factory for creating the proper subclass.

src/usr/ipmi/ipmibt.C

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,15 @@ namespace IPMI
317317
"completion code %x",
318318
iv_netfun, iv_cmd, iv_seq, iv_cc);
319319

320+
if (iv_cc == IPMI::CC_CMDSPC1)
321+
{
322+
// We got a completion code with 0x80, which is no data
323+
// Let's trace the event, but not log an error.
324+
IPMI_TRAC(ERR_MRK "SEL returned with no data, not logging "
325+
"an error");
326+
break;
327+
}
328+
320329
/* @errorlog tag
321330
* @errortype ERRL_SEV_INFORMATIONAL
322331
* @moduleid IPMI::MOD_IPMISRV_REPLY
@@ -338,7 +347,7 @@ namespace IPMI
338347
errlCommit(err, IPMI_COMP_ID);
339348
break;
340349
}
341-
350+
342351
// Before we self destruct, we need to turn the data collected in to
343352
// a record we can pass to the waiting event handler.
344353
Singleton<IpmiRP>::instance().postEvent(new IPMI::oemSEL(iv_data));

src/usr/ipmi/ipmirp.C

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,13 @@ void IpmiRP::handlePowerMessage( IPMI::oemSEL* i_event )
438438
#endif
439439

440440
}
441-
// If the event type is a power soft reset aka power cycle
441+
// If the event type is a power soft reset, send a chasis reset
442442
// update the modifier to send to the BMC
443443
else if( i_event->iv_cmd[1] == IPMI::CHASSIS_POWER_SOFT_RESET )
444444
{
445-
// handle the message as a power cycle request
446-
IPMI_TRAC("IPMI power cycle request received");
447-
iv_chassis_power_mod = IPMI::CHASSIS_POWER_CYCLE;
445+
// handle the message as a power reset request
446+
IPMI_TRAC("IPMI power reset request received");
447+
iv_chassis_power_mod = IPMI::CHASSIS_POWER_RESET;
448448
#ifdef CONFIG_CONSOLE
449449
CONSOLE::displayf(NULL, "IPMI: power cycle requested");
450450
CONSOLE::flush();

0 commit comments

Comments
 (0)