Subject: Re: Sun-3 ttya/b HW flow control mods?
To: None <>
From: Ty Sarna <>
List: port-sun3
Date: 02/16/1994 05:09:23
[from comp.sys.sun.wanted]

In article <> (Alan G. Arndt) writes:
> In article <1336@acmehi.UUCP> kim@acmehi.UUCP (Kim Kempf) writes:
> >I recall a posting some time ago where someone reworked the Sun-3
> >tty drivers (Z8530?) to support incoming hardware flow control and
> >that driver patches/mods would be available.
> >
> >Please can anyone can give me a pointer to this or start up another
> >discussion of how to support incoming h/w flow control?  Why didn't
> >Sun support this in the first place?  How can we get our Sun-3's to
> >stop a high-speed (19200) stream before driver buffers overflow.
> People keep asking...It isn't going to happen.  It's not a software
> problem and Sun couldn't do anything about it.  The 8530 doesn't support
> h/w flow control for incoming data (silly them, they followed the RS-232
> standard).  So from Sun's point of view, if you can get to the UART to
> set the RTS line inactive you can also get there to read the character.
> So why bother setting flow control off, just read it and go on.
> Now the fix that is possible and Sun should have done a long time ago
> is that the 8530 has a 3 deep FiFo and when you get an interrupt you
> should read the FiFo until it's EMPTY instead of just one byte.  That
> would effectively get you a receive rate that is 3x higher than what
> ever your machine can handle reliably right now.  The TX routine should
> also try to write as many bytes as it can, the 8530 only has 1 byte but
> a simple chip replacement on older Sun's can put a 85230 in which has
> a 8 or 12 byte receive and a similar increase on the TX side.  This
> would allow for significantly higher rates to be reliable.
> The last problem is that some (or a lot) of older 3/60's (and possibly
> many other machines) have a hardware ECO needed to even reliably
> exceed 19.2.  I do not know what this is but my speculation is that the
> 8530 has a level triggered interrupt output and the 68xxx has a edge
> triggered input (or at least Sun's interrupt controller).  So even when
> the uart manages to capture your character because it has a 3 deep FiFo
> and you only read one of them the interrupt line never toggles and the
> CPU sits there thinking it has nothing to do.  This causes the 3/60
> to wedge itself on high speed input until you stop sending bytes to
> the 3/60 and it sends some out.  Lousy situation, but this too could
> be fixed by the same software patch.
> So, does anyone have a patch to READ and preferable WRITE multiple bytes
> in a single interrupt for the 8530 uart?

Questions: does the sparc zs driver implement these enhancements? Has
anyone looked at doing it? Anyone tried the 85230 enhancement? Anyone
know if the sparc port supports it or could be made to easily?

The reason I ask is, my sun3 is used mainly for uucp. It does pretty
well, except that the machine just can't handle 19200 reliably (let
alone higher rates if I upgrade to V.34 at some point). So, I'm faced
with retiring the beast in favor of a cheap PC (with one of those icky
"i"-word processors), or making it work better. So, if I could upgrade
my sun3 to a new OS with decent serial driver, I'd really rather save
the money for something else.

The upshot of all this is that I might finally have found the excuse I
needed to spend some time hacking NetBSD/sun3 :-)

Ty Sarna                 "As you know, Joel, children have always looked        up to cowboys as role models. And vice versa."