*BSD News Article 8178


Return to BSD News archive

Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.hawaii.edu!ames!sun-barr!cs.utexas.edu!uunet!mcsun!fuug!kiae!demos!newsserv
From: "Andrew A. Chernov, Black Mage" <ache@astral.msk.su>
Newsgroups: comp.unix.bsd
Subject: Patch com.c for correct RTSCTS handle (silo overflow)
Date: Thu, 26 Nov 92 23:36:23 +0300
Distribution: world
Organization: Ha-oh-lahm Yetzirah
Message-ID: <cF7LJ5hW40@astral.msk.su>
Sender: news-service@newcom.kiae.su
Reply-To: ache@astral.msk.su
Keywords: RTSCTS com.c silo 386bsd
Lines: 31

Hi,
I found small bug in standard com.c driver, t_flags field
NEVER contain CRTSCTS, but t_cflag filed does.
Fix help me to minimize "silo overflow".


*** com.c.was	Sun Nov 22 02:52:48 1992
--- com.c	Thu Nov 26 23:10:43 1992
***************
*** 400,406 ****
  			outb(com+com_mcr,
  				inb(com+com_mcr) & ~(MCR_DTR | MCR_RTS) | MCR_IENABLE);
  	} else if ((stat & MSR_DCTS) && (tp->t_state & TS_ISOPEN) &&
! 		   (tp->t_flags & CRTSCTS)) {
  		/* the line is up and we want to do rts/cts flow control */
  		if (stat & MSR_CTS) {
  			tp->t_state &=~ TS_TTSTOP;
--- 400,406 ----
  			outb(com+com_mcr,
  				inb(com+com_mcr) & ~(MCR_DTR | MCR_RTS) | MCR_IENABLE);
  	} else if ((stat & MSR_DCTS) && (tp->t_state & TS_ISOPEN) &&
! 		   (tp->t_cflag & CRTSCTS)) {
  		/* the line is up and we want to do rts/cts flow control */
  		if (stat & MSR_CTS) {
  			tp->t_state &=~ TS_TTSTOP;
-- 
In-This-Life:  Andrew A. Chernov    |  "Hay mas dicha, mas contento
Internet:      ache@astral.msk.su   |  "Que adorar una hermosura
Organization:  The RELCOM Corp.,    |  "Brujuleada entre los lejos
               Moscow, Russia       |  "De lo imposible?!"  (Calderon)