Remove shut down on VR watchdog timeout
The BMC should not force the system off based on a power good
timeout.
This change removes the shutdown and the "failed transition
to On" state which only existed to handle the shutdown.
Now on errors during power-on, BMC will log the event and
go to the Off state. The Off state will now also handle
getting a power good event and going straight to On.
Tested:
Forced a power good timeout and confirmed that the BMC and
system both end up in the On state.
Change-Id: If4574a01ae821017604ca8ac0ec54b4d281b4d3b
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
index fe56d74..3ba16dd 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -134,7 +134,6 @@
on,
waitForPSPowerOK,
waitForSIOPowerGood,
- failedTransitionToOn,
off,
transitionToOff,
gracefulTransitionToOff,
@@ -157,9 +156,6 @@
case PowerState::waitForSIOPowerGood:
return "Wait for SIO Power Good";
break;
- case PowerState::failedTransitionToOn:
- return "Failed Transition to On";
- break;
case PowerState::off:
return "Off";
break;
@@ -305,7 +301,6 @@
static void powerStateOn(const Event event);
static void powerStateWaitForPSPowerOK(const Event event);
static void powerStateWaitForSIOPowerGood(const Event event);
-static void powerStateFailedTransitionToOn(const Event event);
static void powerStateOff(const Event event);
static void powerStateTransitionToOff(const Event event);
static void powerStateGracefulTransitionToOff(const Event event);
@@ -327,9 +322,6 @@
case PowerState::waitForSIOPowerGood:
return powerStateWaitForSIOPowerGood;
break;
- case PowerState::failedTransitionToOn:
- return powerStateFailedTransitionToOn;
- break;
case PowerState::off:
return powerStateOff;
break;
@@ -394,7 +386,6 @@
break;
case PowerState::waitForPSPowerOK:
case PowerState::waitForSIOPowerGood:
- case PowerState::failedTransitionToOn:
case PowerState::off:
case PowerState::transitionToOff:
case PowerState::transitionToCycleOff:
@@ -421,7 +412,6 @@
break;
case PowerState::waitForPSPowerOK:
case PowerState::waitForSIOPowerGood:
- case PowerState::failedTransitionToOn:
case PowerState::off:
case PowerState::cycleOff:
return "xyz.openbmc_project.State.Chassis.PowerState.Off";
@@ -1448,7 +1438,7 @@
setPowerState(PowerState::waitForSIOPowerGood);
break;
case Event::psPowerOKWatchdogTimerExpired:
- setPowerState(PowerState::failedTransitionToOn);
+ setPowerState(PowerState::off);
psPowerOKFailedLog();
break;
case Event::sioPowerGoodAssert:
@@ -1472,39 +1462,8 @@
setPowerState(PowerState::on);
break;
case Event::sioPowerGoodWatchdogTimerExpired:
- setPowerState(PowerState::failedTransitionToOn);
+ setPowerState(PowerState::off);
systemPowerGoodFailedLog();
- forcePowerOff();
- break;
- default:
- phosphor::logging::log<phosphor::logging::level::INFO>(
- "No action taken.");
- break;
- }
-}
-
-static void powerStateFailedTransitionToOn(const Event event)
-{
- logEvent(__FUNCTION__, event);
- switch (event)
- {
- case Event::psPowerOKAssert:
- // We're in a failure state, so don't allow the system to turn on
- // without a user request
- forcePowerOff();
- break;
- case Event::psPowerOKDeAssert:
- // Cancel any GPIO assertions held during the transition
- gpioAssertTimer.cancel();
- break;
- case Event::powerButtonPressed:
- psPowerOKWatchdogTimerStart();
- setPowerState(PowerState::waitForPSPowerOK);
- break;
- case Event::powerOnRequest:
- psPowerOKWatchdogTimerStart();
- setPowerState(PowerState::waitForPSPowerOK);
- powerOn();
break;
default:
phosphor::logging::log<phosphor::logging::level::INFO>(
@@ -1524,6 +1483,9 @@
case Event::sioS5DeAssert:
setPowerState(PowerState::waitForPSPowerOK);
break;
+ case Event::sioPowerGoodAssert:
+ setPowerState(PowerState::on);
+ break;
case Event::powerButtonPressed:
psPowerOKWatchdogTimerStart();
setPowerState(PowerState::waitForPSPowerOK);