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.
This commit is contained in:
parent
a2d2f49e24
commit
911e4d4ff6
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user