Subject: Re: Hardware handshaking
To: None <amiga@NetBSD.ORG,,>
From: Niklas Hallqvist <>
List: amiga
Date: 10/20/1994 02:07:51
In-reply-to: <> (
Subject: Re: Hardware handshaking

>>>>> "Michael" == Michael L Hitch <> writes:

Michael> On Oct 19, 1:43pm, Jeremy Alan Green wrote:
>> Does anyone have a patch to enable hardware handshaking for
>> NetBSD-Amiga?  I'm trying to ftp large files (X11R5) over ppp and
>> it is incredibly slow with all of the silo overflows.  It goes at
>> about 25% efficiency over a 14.4 modem.

Michael>   There is no patch to fix silo overflows.  The silo overflow
Michael> indicates that the hardware receive register was overwritten
Michael> with another character before the software could read the
Michael> previous character.  The Amiga serial port does not do
Michael> hardware flow control in hardware.

Michael>   The latest kernel should include the updated serial driver
Michael> that does implement CRT/RTS handshaking by the software.
Michael> [Output handshaking has always (as far as I can remember)
Michael> been there, but input handshaking wasn't until recently.]
Michael> This will only help with receive buffer overflows, not silo
Michael> overflows.

Michael>   The only cure for silo overflows is either a faster
Michael> CPU/memory, or a serial card with for hardware buffering.

Yes, I should've read the whole original message before posting the
patch.  silo overflows *will* continue, especially on GVP systems.
In fact, I thought I had a solution to the GVP problem (DMA taking
over the bus in a way the machine stalls).  Outline:

I added the following functions:

void register_fast_device (void (*stop)(void *), void (*start)(void *), void *arg);
void unregister_fast_device (void *arg);
void stop_fast_devices ();
void start_fast_devices ();

and then called stop'n'start_fast_devices at the appropriate spots in
gtsc.c (when DMA is started and stopped respectively).  I also made
the registration of my "fast" serial device (an ISA com-driver over the
GG2-bus) happen when the input baudrate exceeded 9600.  The
stop'n'start functions for that device were basically maintaining the
RTS line together with the TS_TBLOCK bit.

Sad to say, it didn't work.  I don't know, but it seemed like I got
race conditions where I lost characters completely all the time.
Then I got too tired to pursue the matter.  I thought, maybe it
isn't GVP at all, but rather my massive amount of slow 16-bit mem
and my slow 33MHz '030.  I got thinking of having a bounce-buffer
in 32-bit RAM, delaying the final moving of data with a sicallback.
That would probably be enough to drive at least 19200 without silo
overflows (gtsc_maxdma set to 512).  Maybe 38400 would work at
gtsc_maxdma 256, but I'm just guessing.

Today I can live with 19200 (getting silo overflows every once in
a while, but not too frequently), but I'm getting a 16550 to my serial
card very soon so I can step up a bit.

I really, really want a '040 accel for my A2000, or a cheap A4000/040,
badly... :-(