Subject: port-i386/426: mistake in /sys/arch/i386/isa/com.c
To: None <gnats-admin>
From: Alasdair Baird <alasdair@wildcat.demon.co.uk>
List: netbsd-bugs
Date: 08/21/1994 00:05:04
>Number:         426
>Category:       port-i386
>Synopsis:       error in com.c that prevents MDMBUF flag being respected
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 21 00:05:03 1994
>Originator:     Alasdair Baird
>Organization:
absolutely none whatsoever
>Release:        current (Aug 18)
>Environment:
System: NetBSD wildcat.demon.co.uk 1.0_BETA NetBSD 1.0_BETA (WILDCAT) #38: Tue Aug 16 14:09:12 BST 1994 root@wildcat.demon.co.uk:/usr/src/sys/arch/i386/compile/WILDCAT i386


>Description:
	In com.c the MDMBUF flag is looked for in the tty struct's
	t_lflag field to determine whether it should be assumed that
	a carrier is present.  However, the MDMBUF flag doesn't live
	in t_lflag; it is to be found in the t_cflag field.
>How-To-Repeat:
	Found by inspection.  (Does anyone actually use MDMBUF?)
>Fix:
	Change an occurance of t_lflag to be t_cflag as follows:


*** com.c.old	Sat Aug 20 15:06:42 1994
--- com.c	Sat Aug 20 15:07:48 1994
***************
*** 313,319 ****
  
  		sc->sc_msr = inb(iobase + com_msr);
  		if (sc->sc_swflags & COM_SW_SOFTCAR || sc->sc_msr & MSR_DCD ||
! 		    tp->t_lflag&MDMBUF)
  			tp->t_state |= TS_CARR_ON;
  		else
  			tp->t_state &= ~TS_CARR_ON;
--- 313,319 ----
  
  		sc->sc_msr = inb(iobase + com_msr);
  		if (sc->sc_swflags & COM_SW_SOFTCAR || sc->sc_msr & MSR_DCD ||
! 		    tp->t_cflag & MDMBUF)
  			tp->t_state |= TS_CARR_ON;
  		else
  			tp->t_state &= ~TS_CARR_ON;
>Audit-Trail:
>Unformatted:


------------------------------------------------------------------------------