From 7b61f45bf306d3176a907c01d1a0f419916469ac Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 30 Nov 1996 14:51:04 +0000 Subject: Cleaned up CONSPEED changes. `comdefaultrate' gives the default speed for the "com" console, not for general purpose "com" ports, so there was no need to split it into comdefaultrate and condefaultrate. --- sys/dev/sio/sio.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'sys/dev/sio') diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 697deb8..72a4424 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.148 1996/11/02 02:26:01 pst Exp $ + * $Id: sio.c,v 1.149 1996/11/13 18:31:51 bde Exp $ */ #include "opt_comconsole.h" @@ -328,8 +328,7 @@ static struct cdevsw sio_cdevsw = { }; static int comconsole = -1; -static speed_t comdefaultrate = TTYDEF_SPEED; -static speed_t condefaultrate = CONSPEED; +static speed_t comdefaultrate = CONSPEED; static u_int com_events; /* input chars + weighted output completions */ static int sio_timeout; static int sio_timeouts_until_log; @@ -808,10 +807,9 @@ sioattach(isdp) com->it_in.c_cflag = TTYDEF_CFLAG | CLOCAL; com->it_in.c_lflag = TTYDEF_LFLAG; com->lt_out.c_cflag = com->lt_in.c_cflag = CLOCAL; - com->it_in.c_ispeed = com->it_in.c_ospeed = condefaultrate; - } else com->it_in.c_ispeed = com->it_in.c_ospeed = comdefaultrate; - + } else + com->it_in.c_ispeed = com->it_in.c_ospeed = TTYDEF_SPEED; termioschars(&com->it_in); com->it_out = com->it_in; @@ -2348,7 +2346,7 @@ siocnopen(sp) /* * Save all the device control registers except the fifo register - * and set our default ones (cs8 -parenb speed=condefaultrate). + * and set our default ones (cs8 -parenb speed=comdefaultrate). * We can't save the fifo register since it is read-only. */ iobase = siocniobase; @@ -2365,7 +2363,7 @@ siocnopen(sp) * data input register. This also reduces the effects of the * UMC8669F bug. */ - divisor = ttspeedtab(condefaultrate, comspeedtab); + divisor = ttspeedtab(comdefaultrate, comspeedtab); dlbl = divisor & 0xFF; if (sp->dlbl != dlbl) outb(iobase + com_dlbl, dlbl); -- cgit v1.1