summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio/sio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sio/sio.c')
-rw-r--r--sys/dev/sio/sio.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 4b4f39d..2a73b2f 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.146 1996/09/14 04:27:42 bde Exp $
+ * $Id: sio.c,v 1.147 1996/09/30 12:22:27 bde Exp $
*/
#include "opt_comconsole.h"
@@ -329,6 +329,7 @@ static struct cdevsw sio_cdevsw = {
static int comconsole = -1;
static speed_t comdefaultrate = TTYDEF_SPEED;
+static speed_t condefaultrate = CONSPEED;
static u_int com_events; /* input chars + weighted output completions */
static int sio_timeout;
static int sio_timeouts_until_log;
@@ -807,9 +808,11 @@ 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;
+
termioschars(&com->it_in);
- com->it_in.c_ispeed = com->it_in.c_ospeed = comdefaultrate;
com->it_out = com->it_in;
/* attempt to determine UART type */
@@ -2339,7 +2342,7 @@ siocnopen(sp)
/*
* Save all the device control registers except the fifo register
- * and set our default ones (cs8 -parenb speed=comdefaultrate).
+ * and set our default ones (cs8 -parenb speed=condefaultrate).
* We can't save the fifo register since it is read-only.
*/
iobase = siocniobase;
@@ -2356,7 +2359,7 @@ siocnopen(sp)
* data input register. This also reduces the effects of the
* UMC8669F bug.
*/
- divisor = ttspeedtab(comdefaultrate, comspeedtab);
+ divisor = ttspeedtab(condefaultrate, comspeedtab);
dlbl = divisor & 0xFF;
if (sp->dlbl != dlbl)
outb(iobase + com_dlbl, dlbl);
OpenPOWER on IntegriCloud