svn commit: r261574 - in stable/9/sys/boot: i386/libi386 pc98/libpc98

Alexander Motin mav at FreeBSD.org
Fri Feb 7 04:10:31 UTC 2014


Author: mav
Date: Fri Feb  7 04:10:30 2014
New Revision: 261574
URL: http://svnweb.freebsd.org/changeset/base/261574

Log:
  MFC r260949:
  Make comconsole options set before its activation to be remembered.

Modified:
  stable/9/sys/boot/i386/libi386/comconsole.c
  stable/9/sys/boot/pc98/libpc98/comconsole.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/boot/   (props changed)

Modified: stable/9/sys/boot/i386/libi386/comconsole.c
==============================================================================
--- stable/9/sys/boot/i386/libi386/comconsole.c	Fri Feb  7 04:09:15 2014	(r261573)
+++ stable/9/sys/boot/i386/libi386/comconsole.c	Fri Feb  7 04:10:30 2014	(r261574)
@@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int f
 	return (CMD_ERROR);
     }
 
-    if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 &&
-	comc_curspeed != speed)
+    if (comc_curspeed != speed)
 	comc_setup(speed, comc_port);
 
     env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -200,8 +199,7 @@ comc_port_set(struct env_var *ev, int fl
 	return (CMD_ERROR);
     }
 
-    if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 &&
-	comc_port != port)
+    if (comc_port != port)
 	comc_setup(comc_curspeed, port);
 
     env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -309,6 +307,8 @@ comc_setup(int speed, int port)
     unsetenv("hw.uart.console");
     comc_curspeed = speed;
     comc_port = port;
+    if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0)
+	return;
 
     outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT);
     outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff);

Modified: stable/9/sys/boot/pc98/libpc98/comconsole.c
==============================================================================
--- stable/9/sys/boot/pc98/libpc98/comconsole.c	Fri Feb  7 04:09:15 2014	(r261573)
+++ stable/9/sys/boot/pc98/libpc98/comconsole.c	Fri Feb  7 04:10:30 2014	(r261574)
@@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int f
 	return (CMD_ERROR);
     }
 
-    if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 &&
-	comc_curspeed != speed)
+    if (comc_curspeed != speed)
 	comc_setup(speed, comc_port);
 
     env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -200,8 +199,7 @@ comc_port_set(struct env_var *ev, int fl
 	return (CMD_ERROR);
     }
 
-    if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 &&
-	comc_port != port)
+    if (comc_port != port)
 	comc_setup(comc_curspeed, port);
 
     env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
@@ -309,6 +307,8 @@ comc_setup(int speed, int port)
     unsetenv("hw.uart.console");
     comc_curspeed = speed;
     comc_port = port;
+    if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) == 0)
+	return;
 
     outb(comc_port + com_cfcr, CFCR_DLAB | COMC_FMT);
     outb(comc_port + com_dlbl, COMC_BPS(speed) & 0xff);


More information about the svn-src-stable-9 mailing list