aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);