Subject: port-i386/2043: comprobeESP() marks non-ESP boards as ESP.
To: None <gnats-bugs@NetBSD.ORG>
From: Simon J. Gerraty <>
List: netbsd-bugs
Date: 02/07/1996 23:26:15
>Number:         2043
>Category:       port-i386
>Synopsis:       comprobeESP() marks non-ESP boards as ESP.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb  7 10:20:05 1996
>Originator:     Simon J. Gerraty
Zen Programming...
>Release:        Feb 03
System: NetBSD 1.1A-1996.02.03 NetBSD 1.1A-1996.02.03 (ZEN) #1: Wed Feb 7 22:48:27 EST 1996 i386

dev/isa/com.c: comprobeESP() probes my non-ESP tty02 port as a full
blown ESP when it is not.  

Treating the port as an ESP one effectively disabled transmission on
the port - which happened to be the one for my Internet feed.

Have a cheap I/O card configured at port 0x2e8 with a 16550a uart:

/netbsd: com0 at isa0 port 0x3f8-0x3ff irq 4: ns8250 or ns16
/netbsd: com1 at isa0 port 0x2f8-0x2ff irq 3: ns8250 or ns16
/netbsd: com2 at isa0 port 0x2e8-0x2ef irq 9: ESP: ns16550a,  working fifo

I simply made comprobeESP() return imediately to get back on the net,
but that is not a fix. 

Perhaps there should be a flag in the kernel config to enable the ESP

The following got me going again.

RCS file: /local/src/master/usr.src/sys/dev/isa/com.c,v
retrieving revision 1.3
diff -c -b -r1.3 com.c
*** com.c       1996/01/30 06:02:55     1.3
--- com.c       1996/02/07 12:24:13
*** 255,260 ****
--- 255,261 ----
        int com_iobase;
        struct com_softc *sc;
+ #ifndef HAVE_COM_ESP
        char    val;
        char    dips;
        int     combaselist[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
*** 311,316 ****
--- 312,318 ----
        SET(sc->sc_hwflags, COM_HW_ESP);
+ #endif