diff options
Diffstat (limited to 'sys/dev/sio')
-rw-r--r-- | sys/dev/sio/sio.c | 13 | ||||
-rw-r--r-- | sys/dev/sio/sioreg.h | 6 |
2 files changed, 13 insertions, 6 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); diff --git a/sys/dev/sio/sioreg.h b/sys/dev/sio/sioreg.h index bc77dd6..486ac54 100644 --- a/sys/dev/sio/sioreg.h +++ b/sys/dev/sio/sioreg.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)comreg.h 7.2 (Berkeley) 5/9/91 - * $Id: sioreg.h,v 1.3 1995/01/20 07:34:18 wpaul Exp $ + * $Id: sioreg.h,v 1.4 1995/12/10 13:39:15 phk Exp $ */ @@ -119,3 +119,7 @@ #ifndef CONUNIT #define CONUNIT (0) #endif + +#ifndef CONSPEED +#define CONSPEED (9600) +#endif |