*BSD News Article 18352


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!mel.dit.csiro.au!its.csiro.au!dmssyd.syd.dms.CSIRO.AU!metro!sequoia!ultima!kralizec.zeta.org.au!kralizec.zeta.org.au!not-for-mail
From: bde@kralizec.zeta.org.au (Bruce Evans)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Slcompress -- enforce HW flow-control, patch
Date: 14 Jul 1993 06:16:54 +1000
Organization: Kralizec Dialup Unix Sydney: +61-2-837-1183 V.32bis
Lines: 34
Message-ID: <21v57mINN7n@kralizec.zeta.org.au>
References: <Felipe.28.740578609@utopia.hacktic.nl> <C9I9Hs.ABv@news.cso.uiuc.edu> <hastyC9IFM3.F9u@netcom.com> <BLYMN.93Jul6170320@mallee.awadi.com.au> <21f6er$2v7@max.in-berlin.de>
NNTP-Posting-Host: kralizec.zeta.org.au

In <21f6er$2v7@max.in-berlin.de> berry@max.IN-Berlin.DE (Stefan Behrens) writes:

>In article <BLYMN.93Jul6170320@mallee.awadi.com.au> blymn@awadi.com.au (Brett Lymn) writes:
>>If you use a v.42bis modem I would *strongly* recommend that you
>>ensure that the flow control is enabled on the serial port (use stty
>>crtscts to do this).  I did modify slattach to add a flag to enable
>>the hardware flow control on the port.

>I also recommend the usage of hardware flow-control on the serial port.
>But why change every application to support it. I simply hacked the
>kernel to force usage of hardware flow-control configurable with the
>minor device nuber.

I use this in /etc/netstart:

	nohup slattach /dev/sio00 38400 >/dev/null
	stty 115200 crtscts </dev/sio00	# correct for deficiencies of slattach

Add other stty flags as desired.  It would be better for slattach to do
this internally so that it can restore the original settings when it
exits.  A good way for it to do this would be to fork /bin/stty to change
the settings.

>The following patch against 386BSD0.1 pk0.2.4 will enable hw-flow-control
>if the bit 6 of the minor number is set. The minor numbers should look
>like this:

I used to like magic bits in the minor number, but now I think that they
cause too many problems for device open/close.  The vfs layer doesn't
doesn't know about the magic bits, so it calls the device close routine
too often.  This leads to bugs like keyboard getting killed when something
opens and closes /dev/vga.
-- 
Bruce Evans  bde@kralizec.zeta.org.au