Subject: Re: RS232 still dropping chars.
To: None <e.p.boven@student.utwente.nl>
From: Tor Egge <Tor.Egge@idt.ntnu.no>
List: port-sparc
Date: 10/13/1996 02:40:29
> Hello everyone,
> 
> Though NetBSD is a very nice and stable OS for my ELC, I do have one
> little gripe: I still keep losing characters on my ttya. Now Gordon 
> suggested a while ago to port the Sun3-serial drivers to Sparc, because
> there the problem seems to be solved. I have looked into the conversion, 
> but alas my grasp of kernel/hardware programming is not good enough to 
> attempt this.
> Is anyone else perhaps working on a fix for this problem? The NetBSD-
> www-page lists the SCC-ports as supported, but I feel that is a slight
> excaggeration given it's current performance.
> 
> Regards, Paul.

I have a Tandberg tdv2200 terminal as a console for a Sun Sparc ELC
with a broken crt. During normal use, I've experienced the problem of
lost single characters using bash as shell. Other shells, e.g. sh,
tcsh and csh did not seem to have this problem.

Recompiling bash 1.14.7 with a call to DRAIN_OUTPUT before calling
SETATTR helps avoiding the problem, but this is only a workaround.

Run this program in the background to make the zs driver lose a lot
more characters. I believe the problem is related to zsparam() and
zs_loadchannelregs(). Maybe zs_loadchannelregs() should only load the
registers that actually changes values (if previous state is
unknown, assume the value changed).

------
#include <sys/types.h>
#include <termios.h>
#include <stdio.h>
#include <signal.h>

main()
{
  struct termios attrs;
  tcgetattr(0,&attrs);
  signal(SIGTTOU,SIG_IGN);
  while (1) {
    tcsetattr(0,TCSANOW,&attrs);
    usleep(1000);
  }
}
-----

- Tor Egge