Problem with modem ports (bug in 4.2BSD dmf driver)
Ken Lalonde
kwlalonde at watmath.UUCP
Sat May 18 03:32:18 AEST 1985
The DMF driver stops listening for carrier transitions when the
other end hangs up. Look at vaxuba/dmf.c, function dmfrint().
Change the code to read as shown below.
} else {
if (tp->t_state & TS_CARR_ON) {
gsignal(tp->t_pgrp, SIGHUP);
gsignal(tp->t_pgrp, SIGCONT);
addr->dmfcsr = DMF_IE | DMFIR_LCR |
((c>>8)&07);
/* next line used to read addr->dmftms = 0; */
addr->dmfun.dmfirw = DMFLCR_ENA;
ttyflush(tp, FREAD|FWRITE);
}
tp->t_state &= ~TS_CARR_ON;
}
In fact, all references to field dmftms are in error, since that register
is not byte addressable.
While you have your feet wet, there is a missing splx() in dmfparam():
/*
* Block interrupts so parameters will be set
* before the line interrupts.
*/
s = spl5();
addr->dmfcsr = (unit&07) | DMFIR_LCR | DMF_IE;
if ((tp->t_ispeed)==0) {
tp->t_state |= TS_HUPCLS;
(void) dmfmctl(unit, DMF_OFF, DMSET);
splx(s); /* This was missing */
return;
}
Also, the first argument to dmfparam() is sometimes a device number,
sometimes a minor number. It should always be the minor number,
since some callers don't have the device number handy.
- Ken Lalonde ihnp4!watmath!kwlalonde
More information about the Comp.unix.wizards
mailing list