801/212 problem solved
utzoo!decvax!harpo!floyd!trb
utzoo!decvax!harpo!floyd!trb
Tue May 4 14:45:42 AEST 1982
rabbit!ark gave me the following fix for the DZ driver which solved
my problem nicely.
The problem:
------------
My DZ's did not hang up the phone by default. The code in dzopen that
sets tp->t_state |= HUPCLS is commented out; that's the way my (4.1bsd)
driver was delivered; that's the way I like it.
My ACU's (801/212 DN/DZ) were becoming wedged after failure to connect
on an outgoing call. In order to set HUPCLS (Hang UP on last CLoSe)
with an ioctl, one must first successfully open the DZ line. On a
failed connection, dzopen sleeps (until timeout) waiting for the open
to complete, therefore, HUPCLS would not be set and dzclose would not
reset the modem associated with the DZ.
The physical symptoms were that lamps on my 212's (the TR (Terminal
Ready) especially) were staying lit and I couldn't use the dialer on
that line until it somehow cleared.
The fix:
--------
The fix tells dzclose to check to see if the WOPEN (Waiting for OPEN to
complete) is set (this would indicate that an open bombed out) and to
reset the modem if it is. WOPEN is set in dzopen, and it is cleared on
successful open higher up in the tty driver (in tty*.c, not in dz.c).
-----
The code is in dz.c, in dzclose, about three lines from its end.
change: if(tp->t_state & HUPCLS)
dzmodem(unit, DZ_OFF);
to: if(tp->t_state & (HUPCLS | WOPEN))
dzmodem(unit, DZ_OFF);
-----
This should be very useful if your 212/801's wedge and your system
doesn't hang up your phones when you logout on a dialup.
Andy Tannenbaum Bell Labs Whippany, NJ (201) 386-6491
More information about the Comp.unix.wizards
mailing list