Skip to content

Commit

Permalink
Revert "FSP: Disable PSI link whenever FSP tells OPAL about impending…
Browse files Browse the repository at this point in the history
… R/R"

This reverts commit a4788a4.

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 e04a34a 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>
  • Loading branch information
Vasant Hegde authored and oohal committed Mar 30, 2020
1 parent 4ccfb4b commit 3a4daec
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion hw/fsp/fsp-dpo.c
Expand Up @@ -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;

/*
Expand Down
25 changes: 17 additions & 8 deletions hw/fsp/fsp.c
Expand Up @@ -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);
}

Expand Down
1 change: 1 addition & 0 deletions include/fsp.h
Expand Up @@ -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);
Expand Down

0 comments on commit 3a4daec

Please sign in to comment.