diff options
| author | Alexander Motin <mav@FreeBSD.org> | 2014-02-07 04:10:30 +0000 |
|---|---|---|
| committer | Alexander Motin <mav@FreeBSD.org> | 2014-02-07 04:10:30 +0000 |
| commit | 416c38814c8940b96a0d7d3ee7280861a6c4e1a4 (patch) | |
| tree | 2e361f4ca91d0153777e92a47a11eaf73b709196 /sys/boot | |
| parent | 72e62b2dee1220f4ba0b1c88823a7717fad437b6 (diff) | |
Notes
Diffstat (limited to 'sys/boot')
| -rw-r--r-- | sys/boot/i386/libi386/comconsole.c | 8 | ||||
| -rw-r--r-- | sys/boot/pc98/libpc98/comconsole.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/boot/i386/libi386/comconsole.c b/sys/boot/i386/libi386/comconsole.c index e2710c163444..76a62401a9d2 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 e2128a2abc6f..1bf2d6a2ccb7 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); |
