Skip to content

Commit

Permalink
FSP/CONSOLE: Do not associate unavailable console
Browse files Browse the repository at this point in the history
Presently OPAL sends associate/unassociate MBOX command for all
FSP serial console (like below OPAL message). We have to check
console is available or not before sending this message.

OPAL log:
-------
[ 5013.227994012,7] FSP: Reassociating HVSI console 1
[ 5013.227997540,7] FSP: Reassociating HVSI console 2

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
Vasant Hegde authored and stewartsmith committed Oct 11, 2017
1 parent a4788a4 commit 175e406
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions hw/fsp/fsp-console.c
Expand Up @@ -92,6 +92,9 @@ static void fsp_console_reinit(void)
for (i = 0; i < MAX_SERIAL; i++) {
struct fsp_serial *fs = &fsp_serials[i];

if (!fs->available)
continue;

if (fs->rsrc_id == 0xffff)
continue;
prlog(PR_DEBUG, "FSP: Reassociating HVSI console %d\n", i);
Expand Down Expand Up @@ -903,6 +906,10 @@ static void reopen_all_hvsi(void)

for (i = 0; i < MAX_SERIAL; i++) {
struct fsp_serial *fs = &fsp_serials[i];

if (!fs->available)
continue;

if (fs->rsrc_id == 0xffff)
continue;
prlog(PR_NOTICE, "FSP: Deassociating HVSI console %d\n", i);
Expand All @@ -911,6 +918,10 @@ static void reopen_all_hvsi(void)
}
for (i = 0; i < MAX_SERIAL; i++) {
struct fsp_serial *fs = &fsp_serials[i];

if (!fs->available)
continue;

if (fs->rsrc_id == 0xffff)
continue;
prlog(PR_NOTICE, "FSP: Reassociating HVSI console %d\n", i);
Expand Down

0 comments on commit 175e406

Please sign in to comment.