Subject: port-i386/735: DTR not being cleared on i386 port
To: None <gnats-admin@NetBSD.ORG>
From: VaX#n8 <vax@ccwf.cc.utexas.edu>
List: netbsd-bugs
Date: 01/17/1995 21:50:08
>Number:         735
>Category:       port-i386
>Synopsis:       dtr isn't cleared in i386/com.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 17 21:50:05 1995
>Originator:     VaX#n8
>Organization:
>Release:        <NetBSD-current source date> 16 Jan 1995
>Environment:
	
    i486/DX2-66 NetBSD-current
System: NetBSD slip-1-51.ots.utexas.edu 1.0A NetBSD 1.0A (LINKDEAD) #0: Tue Jan 17 22:29:58 CST 1995 bashroot@slip-8-16.ots.utexas.edu:/mnt/sd0e/src/sys/arch/i386/compile/LINKDEAD i386


>Description:
	
The DTR line is forced high by the TIOCSDTR ioctl command, but is not
lowered with the TIOCCDTR ioctl command.
>How-To-Repeat:
	
#include <err.h>
#include <fcntl.h>
#include <termios.h>
main()
{
        int fd;
        if ((fd = open("/dev/tty01", O_RDWR | O_NONBLOCK)) < 0)
                err(1, "/dev/tty01");
        if (ioctl(fd, TIOCSDTR, 0) < 0) err(1, "TIOCSDTR");
        if (ioctl(fd, TIOCCDTR, 0) < 0) err(1, "TIOCCDTR");
}
>Fix:
	
Not sure.  The com.c code appears fairly clear;
        case TIOCSDTR:
                outb(iobase + com_mcr, sc->sc_mcr |= (MCR_DTR | MCR_RTS));
                break;
        case TIOCCDTR:
                outb(iobase + com_mcr, sc->sc_mcr &= ~(MCR_DTR | MCR_RTS));
                break;
So where are these ioctl's documented anyway?  (Aside from the source,
which was suprisingly readable I might add :)
--
MAIL TO THIS ADDRESS: vax@ccwf.cc.utexas.edu
Ask me about BSD Unix for your PC for FREE! (NetBSD) - Yes, it runs fast!
Victimless crimes are a figment of the state's collective imagination.
>Audit-Trail:
>Unformatted: