Acincy.1109 net.bugs.2bsd utzoo!decvax!harpo!zeppo!wheps!eagle!mhuxt!cbosg!cincy!jreuter Mon May 3 08:28:35 1982 LMDMBUF and LNOHANG with dz The dz and dh drivers for 2.8BSD don't support the LMDMBUF and LNOHANG options that will allow a device to use carrier-detect to handshake. I had to do this for an Epson MX-100 with a 2k buffer serial option (I understand they now have a 2k buffer serial option that does XON and XOFF so get that if you're buying Epsons...) so here is the diff with the fixed. This still didn't quite cut it on an 11/23 because the callouts didn't always get processed fast enough to detect the change in CD before the buffer filled. I plan to call dzscan from dzxint every 16 interrupts or so, but that's a kluge so I'm not publishing it. diff dz.c dz.c.old 28d27 t_flags&RAW) || (tp->t_flags&LLITOUT) ) --- > if (tp->t_flags&RAW) 286c284 if (flag==OFF) 288,290c286 dzdtr |= bit; else dzaddr->dzdtr |= bit; 305,314c301,303 t_state&WOPEN)==0 && t_local&LMDMBUF) ) { t_state &= ~TTSTOP; t_rawq ); t_state |= CARR_ON; if ((tp->t_state&CARR_ON)==0) { > wakeup((caddr_t)&tp->t_rawq); > tp->t_state |= CARR_ON; 317,323c306,309 t_state&WOPEN)==0 && t_local&LMDMBUF) ) t_state |= TTSTOP; t_state&WOPEN)==0 && t_local&LNOHANG)==0 ) { t_pgrp, SIGHUP ); --- > if ((tp->t_state&CARR_ON) && > (tp->t_local&LNOHANG)==0) { > if (tp->t_state&ISOPEN) { > signal(tp->t_pgrp, SIGHUP); 325,328c311,313 t_state &= ~CARR_ON; flushtty(tp, FREAD|FWRITE); > } > tp->t_state &= ~CARR_ON; 332c317 timeout(dzscan, (caddr_t)0, 120); Jim Reuter ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.