Subject: Hayes ESP 16550 bug
To: None <current-users@NetBSD.ORG>
From: John Vinopal <banshee@resort.com>
List: current-users
Date: 02/09/1995 05:03:26
For users on the Hayes ESP board, there is a bug in the 16550 emulation.
This bug causes an interrupt for each character received regardless of
the FIFO level settings.  While I am uncertain of the performance hit
this causes (as the FIFO still doesn't drop characters), some testing
of the com driver shows the following behavior:

(9408909+7108374)/7499000	bytes in + bytes out  /  intrs
2.20259807974396586211	bytes / interrupt

Applying Hayes suggested fix, setting the FIFO_DMA flag (bit 3 0x08)
produces the following results:

(1963096 + 1292184) / 250000
13.02112000000000000000

which is much more in keeping with the point of FIFOs.  This ESP bug 
is documented on page 46 of the Hayes ESI Technical Reference.  Excessive
interrupts may be part of the problem with long term slip stability on
i386 machines with the ESP card.

The patch for this is to redefine
#define FIFO_ENABLE (0x01 | 0x08)

in com.c after the inclusion of;
#include <dev/isa/comreg.h>
#include <dev/ic/ns16550.h>

On a related note, I have a netbsd ESP device driver just short of alpha.
It currently works as a terminal with tip, but fails in the transfer to
slip mode via slattach.  I hope to have these problems resolved in the
next week or so.  This device driver currently uses the ESP 1K FIFOs
and PIO transfer to/from the FIFOs.  I hope to add mem map xfers before
I release an alpha version.

Feel free to forward this information as appropriate.

-john