summaryrefslogtreecommitdiffstats
path: root/src/usr/ipmi
diff options
context:
space:
mode:
authorBrian Silver <bsilver@us.ibm.com>2015-02-24 15:05:01 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-02-25 15:24:27 -0600
commit2885f6b2a3061c633a4899a781cb1f9fa862df3e (patch)
tree48ab910b5bce0e62e7e21ab444215d86fe4d398a /src/usr/ipmi
parentb763e0730087b56cf065b75cc0fcdc5b1b06043c (diff)
downloadtalos-hostboot-2885f6b2a3061c633a4899a781cb1f9fa862df3e.tar.gz
talos-hostboot-2885f6b2a3061c633a4899a781cb1f9fa862df3e.zip
Changes for IPMI interworking
Move the check for too many outstanding requests so we don't rely on the control register busy state to stop xmit Remove the error log for unexpected messages. Remove the error log for async messages. RTC: 124619 Change-Id: I74917ee900b71d8d296ae56bc3625a4357a9f72a Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15968 Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: MATTHEW A. PLOETZ <maploetz@us.ibm.com> Reviewed-by: Richard J. Knight <rjknight@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/ipmi')
-rw-r--r--src/usr/ipmi/ipmibt.C23
-rw-r--r--src/usr/ipmi/ipmirp.C84
2 files changed, 36 insertions, 71 deletions
diff --git a/src/usr/ipmi/ipmibt.C b/src/usr/ipmi/ipmibt.C
index f5cba4d1c..9986c15f7 100644
--- a/src/usr/ipmi/ipmibt.C
+++ b/src/usr/ipmi/ipmibt.C
@@ -290,31 +290,12 @@ namespace IPMI
{
// If our completion code isn't CC_OK, lets log that fact. There's
// not much we can do, but at least this might give a hint that
- // something is awry.
+ // something is awry. Note the caller doesn't care, or this would
+ // be synchronous.
if (iv_cc != IPMI::CC_OK)
{
IPMI_TRAC(ERR_MRK "async message (%x:%x seq %d) completion code %x",
iv_netfun, iv_cmd, iv_seq, iv_cc);
-
- /* @errorlog tag
- * @errortype ERRL_SEV_INFORMATIONAL
- * @moduleid IPMI::MOD_IPMISRV_REPLY
- * @reasoncode IPMI::RC_ASYNC_BAD_CC
- * @userdata1 command of message
- * @userdata2 completion code
- * @devdesc an async message completion code was not CC_OK
- * @custdesc Unexpected IPMI completion code from the BMC
- */
- errlHndl_t err = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_INFORMATIONAL,
- IPMI::MOD_IPMISRV_REPLY,
- IPMI::RC_ASYNC_BAD_CC,
- iv_cmd,
- iv_cc,
- true);
-
- err->collectTrace(IPMI_COMP_NAME);
- errlCommit(err, IPMI_COMP_ID);
}
// Yes, this is OK - there is no further reference to this object.
diff --git a/src/usr/ipmi/ipmirp.C b/src/usr/ipmi/ipmirp.C
index 50f8ef2b5..0b6eb68e3 100644
--- a/src/usr/ipmi/ipmirp.C
+++ b/src/usr/ipmi/ipmirp.C
@@ -627,40 +627,43 @@ void IpmiRP::execute(void)
///
void IpmiRP::idle(void)
{
- // Check to see if we have many outstanding requests. If so, don't send
- // any more messages. Note the eagain mechanism still works even though
- // we're not sending messages as eventually we'll get enough responses
- // to shorten the response queue and since the message loop calls us
- // to transmit even for the reception of a message, the driver will
- // eventually reset egagains. If responses timeout, we end up here as
- // the response queue processing sends an idle message when anything is
- // removed.
- if (iv_outstanding_req > iv_respondq.size())
+ // If the interface is idle, we can write anything we need to write.
+ for (IPMI::send_q_t::iterator i = iv_sendq.begin();
+ i != iv_sendq.end();)
{
- // If the interface is idle, we can write anything we need to write.
- for (IPMI::send_q_t::iterator i = iv_sendq.begin();
- i != iv_sendq.end();)
+ // Check to see if we have many outstanding requests. If so, don't send
+ // any more messages. Note the eagain mechanism still works even though
+ // we're not sending messages as eventually we'll get enough responses
+ // to shorten the response queue and since the message loop calls us
+ // to transmit even for the reception of a message, the driver will
+ // eventually reset egagains. If responses timeout, we end up here as
+ // the response queue processing sends an idle message when anything is
+ // removed.
+ if (iv_outstanding_req <= iv_respondq.size())
{
- // If we have a problem transmitting a message, then we just stop
- // here and wait for the next time the interface transitions to idle
- // Note that there are two failure cases: the first is that there is
- // a problem transmitting. In this case we told the other end of the
- // message queue, and so the life of this message is over. The other
- // case is that the interface turned out to be busy in which case
- // this message can sit on the queue and it'll be next.
-
- IPMI::Message* msg = static_cast<IPMI::Message*>((*i)->extra_data);
-
- // If there was an i/o error, we do nothing - leave this message on
- // the queue. Don't touch msg after xmit returns. If the message was
- // sent, and it was async, msg has been destroyed.
- if (msg->xmit())
- {
- break;
- }
- i = iv_sendq.erase(i);
+ break;
+ }
+
+ // If we have a problem transmitting a message, then we just stop
+ // here and wait for the next time the interface transitions to idle
+ // Note that there are two failure cases: the first is that there is
+ // a problem transmitting. In this case we told the other end of the
+ // message queue, and so the life of this message is over. The other
+ // case is that the interface turned out to be busy in which case
+ // this message can sit on the queue and it'll be next.
+
+ IPMI::Message* msg = static_cast<IPMI::Message*>((*i)->extra_data);
+
+ // If there was an i/o error, we do nothing - leave this message on
+ // the queue. Don't touch msg after xmit returns. If the message was
+ // sent, and it was async, msg has been destroyed.
+ if (msg->xmit())
+ {
+ break;
}
+ i = iv_sendq.erase(i);
}
+
return;
}
@@ -720,7 +723,7 @@ void IpmiRP::response(IPMI::Message* i_msg)
// Look for a message with this seq number waiting for a
// response. If there isn't a message looking for this response,
- // that's an error. Async messages should also be on this queue,
+ // log and leave. Async messages should also be on this queue,
// even though the caller has long gone on to other things.
IPMI::respond_q_t::iterator itr = iv_respondq.find(i_msg->iv_key);
if (itr == iv_respondq.end())
@@ -729,25 +732,6 @@ void IpmiRP::response(IPMI::Message* i_msg)
"%d %x:%x", i_msg->iv_key, i_msg->iv_netfun,
i_msg->iv_cmd);
- /* @errorlog tag
- * @errortype ERRL_SEV_UNRECOVERABLE
- * @moduleid IPMI::MOD_IPMISRV_REPLY
- * @reasoncode IPMI::RC_WAITER_NOT_FOUND
- * @userdata1 the network function/lun
- * @userdata2 the command which was in error
- * @devdesc there was no matching message on
- * the response queue
- * @custdesc Unexpected IPMI message from the BMC
- */
- errlHndl_t err = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_UNRECOVERABLE,
- IPMI::MOD_IPMISRV_REPLY,
- IPMI::RC_WAITER_NOT_FOUND,
- i_msg->iv_netfun, i_msg->iv_cmd, true);
-
- err->collectTrace(IPMI_COMP_NAME);
- errlCommit(err, IPMI_COMP_ID);
-
delete[] i_msg->iv_data;
break;
}
OpenPOWER on IntegriCloud