*BSD News Article 26066


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!sgiblab!swrinde!gatech!rutgers!twwells!bill
From: bill@twwells.com (T. William Wells)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Question about serial driver design in NetBSD
Keywords: CLOCAL, calling units, carrier detect
Message-ID: <CJo6u6.65J@twwells.com>
Date: 15 Jan 94 12:03:27 GMT
References: <2gne5h$1hq@nwfocus.wa.com> <2gs9a4INNb29@flinx.robin.de>
Organization: None, Mt. Laurel, NJ
Lines: 21

In article <2gs9a4INNb29@flinx.robin.de>,
Hannes Deeken <hannes@flinx.RoBIN.de> wrote:
: >     outb(com+com_ier, IER_ERXRDY | IER_ETXRDY | IER_ERLS /*| IER_EMSC*/);
:
: The modem status interrupt never gets enabled. That causes the DCD and CTS(!)
: lines to be ignored, preventing carrier detection and hardware flowcontrol
: from working.

Not quite. Flow control works because the modem lines will get
polled on each character in or out. Carrier detect sorta works
because cd changes are usually followed by a character.

The reason for the commented out part is this: in general, an
unconnected line on a serial port "floats", switching from one
state to another. This isn't a problem on the receive line because
the fluctuations don't generally look like a character, not even
a bad character. But on the modem control lines, you'll get *lots*
of interrupts as the lines change state. So, you really want the
modem status interrupts off unless you know that the modem lines
are all properly connected (through to the modem or direct to a
suitable voltage).