*BSD News Article 26102


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!sol.ctr.columbia.edu!howland.reston.ans.net!pipex!uunet!zib-berlin.de!news.th-darmstadt.de!hotb.RoBIN.de!flinx.RoBIN.de!not-for-mail
From: hannes@flinx.RoBIN.de (Hannes Deeken)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Question about serial driver design in NetBSD
Date: 16 Jan 1994 09:35:51 +0100
Organization: Nosimals & Co.
Lines: 49
Message-ID: <2hau9lINN563@flinx.RoBIN.de>
References: <2gne5h$1hq@nwfocus.wa.com> <2gs9a4INNb29@flinx.robin.de> <CJo6u6.65J@twwells.com>
NNTP-Posting-Host: flinx.robin.de
Keywords: CLOCAL, calling units, carrier detect

bill@twwells.com (T. William Wells) writes:

>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.

Wrong. The open won't succeed until carrier is detected, so noone tries
to read from the port. Carrier, on the other hand, won't be detected, since
the interrupt for modem status changes isn't enabled.
In the original com driver, every port got configured during the attach phase
to ignore DCD (look for comsoftCAR).

BTW: where are the modem lines _polled_ outside of comintr(), comeint() and
commint()? Only place I can see is comopen(), where DCD is checked.


>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).

HUH? If I understand this right, I should change my kernel source everytime
I connect or disconnect a device from my serial ports?

First, you're wrong: interrupts for a port get enabled during open,
so you won't have any interrupts from a port you don't use (the
16[45]50 won't generate any).
And even if your claim was right, how do you explain the fact that the
MSC interrupt is _always_ disabled in the original NetBSD/i386 com driver?


Hannes
-- 
Hans-Christoph Deeken | hannes@flinx.{RoBIN.de,hotb.sub.org} (home)
Jungfernstrasse 34    | deeken@iti.informatik.th-darmstadt.de (university)
64291 Darmstadt       | IRC: Glenlivet