aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2020-03-12 18:11:45 +0530
committerOliver O'Halloran <oohall@gmail.com>2020-03-30 18:00:25 +1100
commit3a4daeca76431d557a7c1b8eed82eb788b7ec5c7 (patch)
tree83fd388c5b14d6b71dc5c9aec55f462e9c466bd6
parent4ccfb4b3426fa90b1e84e7f313caf7e60f9d1b79 (diff)
downloadskiboot-3a4daeca76431d557a7c1b8eed82eb788b7ec5c7.zip
skiboot-3a4daeca76431d557a7c1b8eed82eb788b7ec5c7.tar.gz
skiboot-3a4daeca76431d557a7c1b8eed82eb788b7ec5c7.tar.bz2
Revert "FSP: Disable PSI link whenever FSP tells OPAL about impending R/R"
This reverts commit a4788a49f004a91bb8ca015336abf9ae119fbc52. Above patch was added to handle host power down with FSP in R/R state. But FSP is not liking OPAL giving up PSI link early in R/R process. For FSP initiated R/R OPAL should wait until we get PSI interrupt. Hence reverting above commit. Also partially reverting commit e04a34af to make fsp_dpo_pending as global variable. We have made several improvement in the way we handle FSP communication and also in power down path. Now if host sends powerdown message when FSP in RR, OPAL return OPAL_BUSY_EVENT. Kernel will run poller() and retry power down message after sometime. So I think this patch will not have any side effect on power down path. Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Acked-by: Ananth N Mavinakayanahalli <ananth@linux.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
-rw-r--r--hw/fsp/fsp-dpo.c2
-rw-r--r--hw/fsp/fsp.c25
-rw-r--r--include/fsp.h1
3 files changed, 19 insertions, 9 deletions
diff --git a/hw/fsp/fsp-dpo.c b/hw/fsp/fsp-dpo.c
index af97501..91919f9 100644
--- a/hw/fsp/fsp-dpo.c
+++ b/hw/fsp/fsp-dpo.c
@@ -18,7 +18,7 @@
#define DPO_CMD_SGN_BYTE1 0x20 /* Byte[1] signature */
#define DPO_TIMEOUT 2700 /* 45 minutes in seconds */
-static bool fsp_dpo_pending;
+bool fsp_dpo_pending;
static unsigned long fsp_dpo_init_tb;
/*
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index 6f06bfd..70452cf 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -726,14 +726,23 @@ static void fsp_handle_errors(struct fsp *fsp)
if (fsp->state == fsp_mbx_rr)
return;
- /*
- * Its possible that the host has gone down, and OPAL is on
- * its way down and hence will not see the subsequent PSI
- * interrupt. So, just give up the link here.
- */
- psi_disable_link(psi);
- prlog(PR_NOTICE, "FSP #%d: FSP in reset."
- " Giving up PSI link\n", fsp->index);
+ if (fsp_dpo_pending) {
+ /*
+ * If we are about to process a reset when DPO
+ * is pending, its possible that the host has
+ * gone down, and OPAL is on its way down and
+ * hence will not see the subsequent PSI interrupt.
+ * So, just give up the link here.
+ */
+ prlog(PR_NOTICE, "FSP #%d: FSP reset with DPO pending."
+ " Giving up PSI link\n",
+ fsp->index);
+ psi_disable_link(psi);
+ } else {
+ prlog(PR_NOTICE, "FSP #%d: FSP in Reset."
+ " Waiting for PSI interrupt\n",
+ fsp->index);
+ }
fsp_start_rr(fsp);
}
diff --git a/include/fsp.h b/include/fsp.h
index 0c53ed7..2010dd0 100644
--- a/include/fsp.h
+++ b/include/fsp.h
@@ -842,6 +842,7 @@ extern void fsp_epow_init(void);
/* DPO */
extern void fsp_dpo_init(void);
+extern bool fsp_dpo_pending;
/* Chiptod */
extern void fsp_chiptod_init(void);