[net.periphs] Soft carrier bug in 4.?BSD dh/dm driver

steve@dartvax.UUCP (Steve Campbell) (11/20/83)

We recently reshuffled the ports on our VAX 750, moving our DEC DF03
dialer from a dz port to an ABLE dh/dm port.  The dialer refused to work
there, even with the soft carrier config flag set.  The trusty breakout
box showed that the dh/dm port was not raising DTR, so though the DF03
would dial, it would not go into data mode when the callee answered.

The problem turns out to be in the dmopen routine in the (4.[12]BSD) dh/dm
driver, dh.c.  The routine tests the soft carrier flag and exits before
turning on the port, so the open completes, but the control signals
aren't up.

The fix is just to move the test down near the normal end of dmopen.
Here's the "diff new old" of the 4.1BSD version.  The 4.2 code is
the same except for some name changes.

687,688c687,689
< 	if (dm >= NDH || (ui = dminfo[dm]) == 0 || ui->ui_alive == 0) {
< 		tp->t_state |= CARR_ON;  /* This may be unnecessary, but... */
---
> 	if (dm >= NDH || (ui = dminfo[dm]) == 0 || ui->ui_alive == 0 ||
> 	    (dhsoftCAR[dm]&(1<<unit))) {
> 		tp->t_state |= CARR_ON;
698c699
< 	if (addr->dmlstat&DML_CAR || (dhsoftCAR[dm]&(1<<unit)))
---
> 	if (addr->dmlstat&DML_CAR)

						steve campbell
						...decvax!dartvax!steve