diff mbox series

[1/4] FSP/CONSOLE: Do not associate unavailable console

Message ID 20170924174537.26518-1-hegdevasant@linux.vnet.ibm.com
State Superseded
Headers show
Series [1/4] FSP/CONSOLE: Do not associate unavailable console | expand

Commit Message

Vasant Hegde Sept. 24, 2017, 5:45 p.m. UTC
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>
---
 hw/fsp/fsp-console.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Ananth N Mavinakayanahalli Sept. 25, 2017, 3:09 p.m. UTC | #1
On Sun, Sep 24, 2017 at 05:45:34PM +0000, Vasant Hegde wrote:
> 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>
diff mbox series

Patch

diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c
index a855133..c41f5ed 100644
--- a/hw/fsp/fsp-console.c
+++ b/hw/fsp/fsp-console.c
@@ -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);
@@ -903,6 +906,9 @@  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);
@@ -911,6 +917,9 @@  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);