home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / bsd / 11101 < prev    next >
Encoding:
Internet Message Format  |  1993-01-10  |  2.6 KB

  1. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!uknet!mcsun!fuug!kiae!demos!newsserv
  2. From: ache@astral.msk.su (Andrew A. Chernov, Black Mage)
  3. Newsgroups: comp.unix.bsd
  4. Subject: [386bsd] Fix CARRIER for cgd driver, probably for standard too
  5. Message-ID: <YI-p3KhW50@astral.msk.su>
  6. Date: 10 Jan 93 15:13:02 GMT
  7. Sender: news-service@newcom.kiae.su
  8. Reply-To: ache@astral.msk.su
  9. Organization: Ha-oh-lahm Yetzirah
  10. Lines: 72
  11.  
  12. This patch fix two problems with carrier control.
  13.  
  14. 1) User can't type anything to modem (can't redial, f.e.)
  15. after dropping carrier in dialout programs (pcomm f.e.)
  16.  
  17. 2) TIOCMGET don't report carrier status, so application
  18. (BinkleyTerm f.e.) can't determine carrier.
  19.  
  20. I don't have standard driver, but maybe it have this problems too.
  21.  
  22. *** com.c.cdg.was1    Wed Dec 23 10:11:01 1992
  23. --- com.c    Sun Jan 10 17:48:49 1993
  24. ***************
  25. *** 390,396 ****
  26.       else
  27.           tp->t_state &=~ TS_CARR_ON;
  28.   
  29. ! /*    com_ports[unit].fake_dcd = callout; XXX? */
  30.   
  31.   /* never do this -- we know (or hope!) we have carrier
  32.    *    if (!(flag & O_NONBLOCK))
  33. --- 390,396 ----
  34.       else
  35.           tp->t_state &=~ TS_CARR_ON;
  36.   
  37. !     com_ports[unit].fake_dcd = callout;
  38.   
  39.   /* never do this -- we know (or hope!) we have carrier
  40.    *    if (!(flag & O_NONBLOCK))
  41. ***************
  42. *** 519,527 ****
  43.   
  44.       if (stat & MSR_DDCD) {
  45.           register flag = (stat & MSR_DCD) >> 7; /* 0/1 */
  46. !         if (!(*linesw[tp->t_line].l_modem)(tp, flag))
  47.               bic(com+com_mcr, MCR_DTR|MCR_RTS);
  48.       }
  49.   
  50.       if (stat & MSR_DCTS && stat & MSR_CTS && tp->t_state & TS_ISOPEN
  51.           && tp->t_cflag & CCTS_OFLOW)
  52. --- 519,534 ----
  53.   
  54.       if (stat & MSR_DDCD) {
  55.           register flag = (stat & MSR_DCD) >> 7; /* 0/1 */
  56. !         if (!(*linesw[tp->t_line].l_modem)(tp, flag)) {
  57. !     /* Restore logical carrier if dialing out or not use real carrier */
  58. !             if (com_ports[unit].fake_dcd || !com_ports[unit].real_car)
  59. !                 tp->t_state |= TS_CARR_ON;
  60. !             else
  61.                   bic(com+com_mcr, MCR_DTR|MCR_RTS);
  62.           }
  63. +     }
  64.   
  65.       if (stat & MSR_DCTS && stat & MSR_CTS && tp->t_state & TS_ISOPEN
  66.           && tp->t_cflag & CCTS_OFLOW)
  67. ***************
  68. *** 672,677 ****
  69. --- 679,685 ----
  70.                   if (m & MCR_DTR) bits |= TIOCM_DTR;
  71.                   if (m & MCR_RTS) bits |= TIOCM_RTS;
  72.                   m = com_mstat[unit];
  73. +                 if (m & MSR_DCD) bits |= TIOCM_CD;
  74.                   if (m & MSR_CTS) bits |= TIOCM_CTS;
  75.                   if (m & MSR_DSR) bits |= TIOCM_DSR;
  76.                   if (m & (MSR_RI|MSR_TERI)) bits |= TIOCM_RI;
  77. -- 
  78. In-This-Life:  Andrew A. Chernov    |  "Hay mas dicha, mas contento
  79. Internet:      ache@astral.msk.su   |  "Que adorar una hermosura
  80. Organization:  The RELCOM Corp.,    |  "Brujuleada entre los lejos
  81.                Moscow, Russia       |  "De lo imposible?!"  (Calderon)
  82.