Date: Mon, 20 Jan 2014 23:27:06 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260949 - in head/sys/boot: i386/libi386 pc98/libpc98 Message-ID: <201401202327.s0KNR6SN040974@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Mon Jan 20 23:27:05 2014 New Revision: 260949 URL: http://svnweb.freebsd.org/changeset/base/260949 Log: Make comconsole options set before its activation to be remembered. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/boot/i386/libi386/comconsole.c head/sys/boot/pc98/libpc98/comconsole.c Modified: head/sys/boot/i386/libi386/comconsole.c ============================================================================== --- head/sys/boot/i386/libi386/comconsole.c Mon Jan 20 23:25:52 2014 (r260948) +++ head/sys/boot/i386/libi386/comconsole.c Mon Jan 20 23:27:05 2014 (r260949) @@ -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: head/sys/boot/pc98/libpc98/comconsole.c ============================================================================== --- head/sys/boot/pc98/libpc98/comconsole.c Mon Jan 20 23:25:52 2014 (r260948) +++ head/sys/boot/pc98/libpc98/comconsole.c Mon Jan 20 23:27:05 2014 (r260949) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401202327.s0KNR6SN040974>