summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-01-20 23:27:05 +0000
committermav <mav@FreeBSD.org>2014-01-20 23:27:05 +0000
commita327059988fa8661c3a6fe0a02155c55d1b03f5e (patch)
treeda0284bbc22349b8434e54b92ab8f83de752360c /sys/boot
parent6122dfe2dd73e9f4ba231884fd87fbf5ff795789 (diff)
downloadFreeBSD-src-a327059988fa8661c3a6fe0a02155c55d1b03f5e.zip
FreeBSD-src-a327059988fa8661c3a6fe0a02155c55d1b03f5e.tar.gz
Make comconsole options set before its activation to be remembered.
MFC after: 2 weeks Sponsored by: iXsystems, Inc.
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/i386/libi386/comconsole.c8
-rw-r--r--sys/boot/pc98/libpc98/comconsole.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/boot/i386/libi386/comconsole.c b/sys/boot/i386/libi386/comconsole.c
index e2710c1..76a6240 100644
--- a/sys/boot/i386/libi386/comconsole.c
+++ b/sys/boot/i386/libi386/comconsole.c
@@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int flags, const void *value)
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 flags, const void *value)
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);
diff --git a/sys/boot/pc98/libpc98/comconsole.c b/sys/boot/pc98/libpc98/comconsole.c
index e2128a2..1bf2d6a 100644
--- a/sys/boot/pc98/libpc98/comconsole.c
+++ b/sys/boot/pc98/libpc98/comconsole.c
@@ -181,8 +181,7 @@ comc_speed_set(struct env_var *ev, int flags, const void *value)
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 flags, const void *value)
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);
OpenPOWER on IntegriCloud