summaryrefslogtreecommitdiffstats
path: root/hw/fsp/fsp-ipmi.c
diff options
context:
space:
mode:
authorAnanth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>2017-03-15 07:51:34 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-03-16 17:17:24 +1100
commit4940b8148640c06e139aec8c6d0370af7dd3b184 (patch)
tree2259a3e97d45844bdb214ea16c98c9e8e4b2f984 /hw/fsp/fsp-ipmi.c
parent1998d7fe4a640c790e20aaedb9cdb2a581598349 (diff)
downloadblackbird-skiboot-4940b8148640c06e139aec8c6d0370af7dd3b184.tar.gz
blackbird-skiboot-4940b8148640c06e139aec8c6d0370af7dd3b184.zip
hw/fsp: Do not queue SP and SPCN class messages during reset/reload
During FSP R/R, the FSP is inaccessible and will lose state. Messages to the FSP are generally queued for sending later. It does seem like the FSP fails to process any subseuqent messages of certain classes (SP info -- ipmi) if it receives queued mbox messages it isn't expecting. In certain other cases (sensors), the FSP driver returns a default code (async completion) even though there is no known bound from the time of this error return to the actual data being available. The kernel driver keeps waiting leading to soft-lockup on the host side. Mitigate both these (known) cases by returning OPAL_BUSY so the host driver knows to retry later. With this change, the sensors command works fine when the FSP comes back. This version also resolves the remaining IPMI issues Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Tested-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/fsp/fsp-ipmi.c')
-rw-r--r--hw/fsp/fsp-ipmi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/fsp/fsp-ipmi.c b/hw/fsp/fsp-ipmi.c
index f803f179..d262cee6 100644
--- a/hw/fsp/fsp-ipmi.c
+++ b/hw/fsp/fsp-ipmi.c
@@ -126,6 +126,9 @@ static int fsp_ipmi_send_request(void)
struct fsp_msg *msg;
int rc;
+ if (fsp_in_rr())
+ return OPAL_BUSY;
+
lock(&fsp_ipmi.lock);
/* An outstanding request is still pending */
if (fsp_ipmi.cur_msg) {
@@ -208,6 +211,9 @@ static int fsp_ipmi_queue_msg(struct ipmi_msg *ipmi_msg)
struct fsp_ipmi_msg *fsp_ipmi_msg = container_of(ipmi_msg,
struct fsp_ipmi_msg, ipmi_msg);
+ if (fsp_in_rr())
+ return OPAL_BUSY;
+
lock(&fsp_ipmi.lock);
list_add_tail(&fsp_ipmi.msg_queue, &fsp_ipmi_msg->link);
unlock(&fsp_ipmi.lock);
@@ -220,6 +226,9 @@ static int fsp_ipmi_queue_msg_head(struct ipmi_msg *ipmi_msg)
struct fsp_ipmi_msg *fsp_ipmi_msg = container_of(ipmi_msg,
struct fsp_ipmi_msg, ipmi_msg);
+ if (fsp_in_rr())
+ return OPAL_BUSY;
+
lock(&fsp_ipmi.lock);
list_add(&fsp_ipmi.msg_queue, &fsp_ipmi_msg->link);
unlock(&fsp_ipmi.lock);
OpenPOWER on IntegriCloud