*BSD News Article 20860


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!dog.ee.lbl.gov!newshub.nosc.mil!nosc!jadpc!jdeitch
From: jdeitch@jadpc.cts.com (Jim Deitch)
Subject: Re: com driver problems in NetBSD 0.9
Message-ID: <CD9r5o.390@jadpc.cts.com>
Organization: J. Deitch & Associates, San Diego, CA.
References: <cproto.747589511@marsh> <26pfqk$36r@netbsd08.dn.itg.telecom.com.au> <CD7oov.2nI@cyb.fred.com>
Date: Mon, 13 Sep 1993 01:37:00 GMT
Lines: 58

In article <CD7oov.2nI@cyb.fred.com> loodvrij@cyb.fred.com (Bruce 'Loodvrij' Keeler) writes:
>In article <26pfqk$36r@netbsd08.dn.itg.telecom.com.au> tdwyer@netbsd08.dn.itg.telecom.com.au (Terry Dwyer netbsd08 619 491 5161) writes:
>>Computer Protocol (cproto@cs.curtin.edu.au) wrote:
>>
>>: The settings are _almost_ reasonable but I just noticed that
>>: the setting becomes "a bit strange". After login the setting
>>                                       ^^^^^^^^^^^^^^^^^^^^^^^
>>: is 8N1. Once I start VI/ELVIS it becomes 7N1. My first terminal
>>  ^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>>Exactly my point - vi, more, and I think less all fiddle with the 
>>stty and when you exit, the settings are 7E1 when your terminal is
>>8N1.  I think, from memory (quite some time ago), that more garbled
>>the stty as soon as you ran it, I may be wrong.  Have a look on minnie
>>and grab the archives for c.o.3.* for the last two months or so.  The 
>>discussion became fairly technical and I among many others probably
>>skimmed without really understanding what the details were.  I seem to
>>remember there was some talk of hacking the tty driver to provide an
>>8 bit clean environment.  I don't know how far this has gone.
>
>I started a discussion on this about 2 weeks ago.  The problem is in
>tty_compat.c, which deals with translating sgtty TIOC[SG]ETP ioctls into
>termios stuff.  Basically, when you do s GETP, the PASS8 flag is not
>set correctly (from what I can make out).  So when the process does the SETP
>it slips into cs7/parenb mode.  
>
>I originally complained about this in <CC8J0o.7o@cyb.fred.com>, and posted
>a patch in a followup <CCCIwt.AI@cyb.fred.com>.  Once again though, I am
>*NOT* a guru, so use at your own discretion.
>
>One more thing; Pierre Beyssac (Pierre.Beyssac@emeraude.syseca.fr) has been
>having similar (albeit different) problems with the tty_compat.c in NetBSD0.9
>which has apparently changed.  He sent me his fix to it, though I've not
>had chance to test it yet.
>
>Bruce
>
[  patch deleted  ]

I solved this problem, at least temporarily, byt changing the line in
ttydefaults.h.

I took out the PARENB flag and changed the CS7 flag to CS8, for the
default cflags.  It is near the top of the file, I am not near the
system currently, in a line that looks something like:

#define DEFAULT_CFLAG

or so.  (Going from memory here).  Then I recompiled the kernel and
getty and all was well.  I don't know if I needed to recompile getty
or not.  I also got an 8bit clean data path!

Jim

-- 
INTERNET:   jdeitch@jadpc.jd.com
UUCP:	    nosc!jadpc!jdeitch
FIDONET:    Jim_Deitch@f723.n202.z1.fidonet.org  (1:202/723)