From 758c1aecbaaa8b120b0203b6a5b106e3e599180d Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Wed, 7 Jun 2017 21:17:45 -0500 Subject: Return the heartbeat command if queue is empty There are numerous valid situations where the host interface queue may be empty, but the host has an active SMS_ATN. In these cases, ipmid should not log an error and abort but instead just return a default command. The default will be the heartbeat command since its basically a noop to the host. Resolves openbmc/openbmc#1750 Change-Id: I810bb0368c2cbd4aa99b6cf20d29eeefc8b312cd Signed-off-by: Andrew Geissler --- host-interface.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'host-interface.cpp') diff --git a/host-interface.cpp b/host-interface.cpp index be2bd99..0bce888 100644 --- a/host-interface.cpp +++ b/host-interface.cpp @@ -3,7 +3,6 @@ #include #include #include "host-interface.hpp" -#include "elog-errors.hpp" namespace phosphor { @@ -31,8 +30,10 @@ base::Host::Command Host::getNextCommand() if(this->workQueue.empty()) { - log("Control Host work queue is empty!"); - elog(); + // Just return a heartbeat in this case. A spurious SMS_ATN was + // asserted for the host (probably from a previous boot). + log("Control Host work queue is empty!"); + return (Command::Heartbeat); } // Pop the processed entry off the queue -- cgit v1.2.1