<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<small>Hi Ananth,</small><br>
<br>
<div class="moz-cite-prefix">On 11/06/2015 03:10 PM, Ananth N
Mavinakayanahalli wrote:<br>
</div>
<blockquote
cite="mid:20151106094044.1570.62430.stgit@thinktux.in.ibm.com"
type="cite">
<pre wrap="">In a scenario where the DPO has been initiated, but the FSP then went into
reset before the CEC power down came in, OPAL may not give up the link since
it may never see the PSI interrupt. So, if we are in dpo_pending and an FSP
reset is detected via the DISR, give up the PSI link voluntarily.
Tested-by: Vipin K Parashar <a class="moz-txt-link-rfc2396E" href="mailto:vipin@linux.vnet.ibm.com"><vipin@linux.vnet.ibm.com></a>
Signed-off-by: Ananth N Mavinakayanahalli <a class="moz-txt-link-rfc2396E" href="mailto:ananth@in.ibm.com"><ananth@in.ibm.com></a>
---
hw/fsp/fsp-dpo.c | 2 +-
hw/fsp/fsp.c | 20 +++++++++++++++++---
include/fsp.h | 1 +
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/hw/fsp/fsp-dpo.c b/hw/fsp/fsp-dpo.c
index 8c7c296..f6fadc5 100644
--- a/hw/fsp/fsp-dpo.c
+++ b/hw/fsp/fsp-dpo.c
@@ -29,7 +29,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 ab625a5..b53c3f0 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -666,9 +666,23 @@ static void fsp_handle_errors(struct fsp *fsp)
if (fsp->state == fsp_mbx_rr)
return;
- prlog(PR_NOTICE, "FSP #%d: FSP in Reset."
- " Waiting for PSI interrupt\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);
+ }</pre>
</blockquote>
<br>
<small>Instead of exporting the dpo variable.. can we register a dpo
client for RR_EVENT<br>
with moving this logic there and the function just below
'fsp_start_rr()' will do the<br>
rest ...<br>
<br>
Neelesh.<br>
</small><br>
<blockquote
cite="mid:20151106094044.1570.62430.stgit@thinktux.in.ibm.com"
type="cite">
<pre wrap="">
fsp_start_rr(fsp);
}
diff --git a/include/fsp.h b/include/fsp.h
index 4e247cc..a61bd58 100644
--- a/include/fsp.h
+++ b/include/fsp.h
@@ -823,6 +823,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);
_______________________________________________
Skiboot mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Skiboot@lists.ozlabs.org">Skiboot@lists.ozlabs.org</a>
<a class="moz-txt-link-freetext" href="https://lists.ozlabs.org/listinfo/skiboot">https://lists.ozlabs.org/listinfo/skiboot</a>
</pre>
</blockquote>
<br>
</body>
</html>