aboutsummaryrefslogtreecommitdiff
path: root/hw/fsp/fsp-sensor.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 18:02:47 +1100
commitd18986fbc4c2d8ec5495b063cafbd1686403293a (patch)
tree6ac9994ecb0f05ee865d3c61ab93bee0298947d0 /hw/fsp/fsp-sensor.c
parente29a256825f166ba479128748a4d9b7d92620511 (diff)
downloadskiboot-skiboot-5.3.x.zip
skiboot-skiboot-5.3.x.tar.gz
skiboot-skiboot-5.3.x.tar.bz2
hw/fsp: Do not queue SP and SPCN class messages during reset/reloadskiboot-5.3.x
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> (cherry picked from commit 4940b8148640c06e139aec8c6d0370af7dd3b184) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/fsp/fsp-sensor.c')
-rw-r--r--hw/fsp/fsp-sensor.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/fsp/fsp-sensor.c b/hw/fsp/fsp-sensor.c
index 51ee872..ccc7078 100644
--- a/hw/fsp/fsp-sensor.c
+++ b/hw/fsp/fsp-sensor.c
@@ -376,6 +376,9 @@ static int64_t fsp_sensor_send_read_request(struct opal_sensor_data *attr)
uint32_t align;
uint32_t cmd_header;
+ if (fsp_in_rr())
+ return OPAL_BUSY;
+
prlog(PR_INSANE, "Get the data for modifier [%x]\n",
spcn_mod_data[attr->mod_index].mod);
@@ -516,6 +519,9 @@ int64_t fsp_opal_read_sensor(uint32_t sensor_hndl, int token,
prlog(PR_INSANE, "fsp_opal_read_sensor [%08x]\n", sensor_hndl);
+ if (fsp_in_rr())
+ return OPAL_BUSY;
+
if (sensor_state == SENSOR_PERMANENT_ERROR) {
rc = OPAL_HARDWARE;
goto out;