freebsd-dev/sys/isa
Bruce Evans 9fa18570a2 Obtained from: partly from ancient patches of mine via 1.1.5
Introduce TS_CONNECTED and TS_ZOMBIE states.  TS_CONNECTED is set
while a connection is established.  It is set while (TS_CARR_ON or
CLOCAL is set) and TS_ZOMBIE is clear.  TS_ZOMBIE is set for on to
off transitions of TS_CARR_ON that occur when CLOCAL is clear and
is cleared for off to on transitions of CLOCAL.  I/o can only occur
while TS_CONNECTED is set.  TS_ZOMBIE prevents further i/o.

Split the input-event sleep address TSA_CARR_ON(tp) into TSA_CARR_ON(tp)
and TSA_HUP_OR_INPUT(tp).  The former address is now used only for
off to on carrier transitions and equivalent CLOCAL transitions.
The latter is used for all input events, all carrier transitions
and certain CLOCAL transitions.  There are some harmless extra
wakeups for rare connection- related events.  Previously there were
too many extra wakeups for non-rare input events.

Drivers now call l_modem() instead of setting TS_CARR_ON directly
to handle even the initial off to on transition of carrier.  They
should always have done this.  l_modem() now handles TS_CONNECTED
and TS_ZOMBIE as well as TS_CARR_ON.

gnu/isdn/iitty.c:
Set TS_CONNECTED for first open ourself to go with bogusly setting
CLOCAL.

i386/isa/syscons.c, i386/isa/pcvt/pcvt_drv.c:
We fake carrier, so don't also fake CLOCAL.

kern/tty.c:
Testing TS_CONNECTED instead of TS_CARR_ON fixes TIOCCONS forgetting to
test CLOCAL.  TS_ISOPEN was tested instead, but that broke when we disabled
the clearing of TS_ISOPEN for certain transitions of CLOCAL.

Testing TS_CONNECTED fixes ttyselect() returning false success for output
to devices in state !TS_CARR_ON && !CLOCAL.

Optimize the other selwakeup() call (this is not related to the other
changes).

kern/tty_pty.c:
ptcopen() can be declared in traditional C now that dev_t isn't short.
1995-07-31 21:02:00 +00:00
..
ic Peter's work to work around one of the most annoying bugs in the 1995-01-06 15:20:00 +00:00
atrtc.c Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
fd.c Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
fdc.h Peter's work to work around one of the most annoying bugs in the 1995-01-06 15:20:00 +00:00
fdreg.h An ifdef almost hit where it was supposed to go. Joerg owes me a good 1994-09-25 23:37:38 +00:00
joy.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
kbdtables.h Change fkey 63 from ^[[K to ^[[~. 1995-03-28 21:30:13 +00:00
rtc.h Here is a minor patch for FreeBSD 2.0R to allow it to recognize 1994-12-04 20:22:20 +00:00
sio.c Improve input flow control. 1995-07-31 18:29:51 +00:00
sioreg.h Submitted by: Bill Paul (wpaul@ctr.columbia.edu) 1995-01-20 07:34:18 +00:00
syscons.c Obtained from: partly from ancient patches of mine via 1.1.5 1995-07-31 21:02:00 +00:00
syscons.h Fix races in scstart(). q_to_b() wasn't called at spltty(), so there 1995-07-11 18:34:30 +00:00
timerreg.h Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some 1993-10-16 13:48:52 +00:00