1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

First open:

now HUPCL set only in bidir case for callin lines
(this prevents set HUPCL on mouse)
comhardclose:
in addition to HUPCL case now DTR dropped for bidir case
if line was active in and no carrier present now.
(this prevents DTR sleep on mouse)
This commit is contained in:
Andrey A. Chernov 1994-03-08 22:11:10 +00:00
parent e7e0afea3b
commit 3b2b53aa9a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1251
3 changed files with 33 additions and 12 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.30 1994/02/26 00:04:03 phk Exp $
* $Id: sio.c,v 1.31 1994/03/02 20:28:36 guido Exp $
*/
#include "sio.h"
@ -668,9 +668,13 @@ sioopen(dev, flag, mode, p)
tp->t_oflag = 0;
#ifdef COMCONSOLE
if (unit == comconsole)
tp->t_oflag = TTYDEF_OFLAG;
tp->t_oflag = TTYDEF_OFLAG;
#endif
tp->t_cflag = CREAD | CS8;
#ifdef COM_BIDIR
if (com->bidir && !callout)
tp->t_cflag |= HUPCL;
#endif
tp->t_cflag = CREAD | CS8 | HUPCL;
tp->t_lflag = 0;
tp->t_ispeed = tp->t_ospeed = comdefaultrate;
}
@ -800,7 +804,10 @@ comhardclose(com)
outb(iobase + com_ier, 0);
tp = com->tp;
if (tp->t_cflag & HUPCL || tp->t_state & TS_WOPEN
|| !(com->prev_modem_status & MSR_DCD) && !FAKE_DCD(unit)
#ifdef COM_BIDIR
|| com->active_in
&& !(com->prev_modem_status & MSR_DCD) && !FAKE_DCD(unit)
#endif
|| !(tp->t_state & TS_ISOPEN)) {
commctl(com, MCR_RTS, DMSET);
if (com->dtr_wait != 0)

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.30 1994/02/26 00:04:03 phk Exp $
* $Id: sio.c,v 1.31 1994/03/02 20:28:36 guido Exp $
*/
#include "sio.h"
@ -668,9 +668,13 @@ sioopen(dev, flag, mode, p)
tp->t_oflag = 0;
#ifdef COMCONSOLE
if (unit == comconsole)
tp->t_oflag = TTYDEF_OFLAG;
tp->t_oflag = TTYDEF_OFLAG;
#endif
tp->t_cflag = CREAD | CS8;
#ifdef COM_BIDIR
if (com->bidir && !callout)
tp->t_cflag |= HUPCL;
#endif
tp->t_cflag = CREAD | CS8 | HUPCL;
tp->t_lflag = 0;
tp->t_ispeed = tp->t_ospeed = comdefaultrate;
}
@ -800,7 +804,10 @@ comhardclose(com)
outb(iobase + com_ier, 0);
tp = com->tp;
if (tp->t_cflag & HUPCL || tp->t_state & TS_WOPEN
|| !(com->prev_modem_status & MSR_DCD) && !FAKE_DCD(unit)
#ifdef COM_BIDIR
|| com->active_in
&& !(com->prev_modem_status & MSR_DCD) && !FAKE_DCD(unit)
#endif
|| !(tp->t_state & TS_ISOPEN)) {
commctl(com, MCR_RTS, DMSET);
if (com->dtr_wait != 0)

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.30 1994/02/26 00:04:03 phk Exp $
* $Id: sio.c,v 1.31 1994/03/02 20:28:36 guido Exp $
*/
#include "sio.h"
@ -668,9 +668,13 @@ sioopen(dev, flag, mode, p)
tp->t_oflag = 0;
#ifdef COMCONSOLE
if (unit == comconsole)
tp->t_oflag = TTYDEF_OFLAG;
tp->t_oflag = TTYDEF_OFLAG;
#endif
tp->t_cflag = CREAD | CS8;
#ifdef COM_BIDIR
if (com->bidir && !callout)
tp->t_cflag |= HUPCL;
#endif
tp->t_cflag = CREAD | CS8 | HUPCL;
tp->t_lflag = 0;
tp->t_ispeed = tp->t_ospeed = comdefaultrate;
}
@ -800,7 +804,10 @@ comhardclose(com)
outb(iobase + com_ier, 0);
tp = com->tp;
if (tp->t_cflag & HUPCL || tp->t_state & TS_WOPEN
|| !(com->prev_modem_status & MSR_DCD) && !FAKE_DCD(unit)
#ifdef COM_BIDIR
|| com->active_in
&& !(com->prev_modem_status & MSR_DCD) && !FAKE_DCD(unit)
#endif
|| !(tp->t_state & TS_ISOPEN)) {
commctl(com, MCR_RTS, DMSET);
if (com->dtr_wait != 0)