Subject: port-i386/2299: Some Pee Cees need 16550 FIFOs turned off to detect properly from DOS
To: None <gnats-bugs@NetBSD.ORG>
From: None <kenh@cmf.nrl.navy.mil>
List: netbsd-bugs
Date: 04/04/1996 00:42:02
>Number: 2299
>Category: port-i386
>Synopsis: Pee Cees suck, especially some of their BIOSes
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 4 01:05:01 1996
>Last-Modified:
>Originator: Ken Hornstein
>Organization:
No
>Release: 4/3/96 <NetBSD-current source date>
>Environment:
System: NetBSD excalibur 1.1B NetBSD 1.1B (EXCALIBUR) #17: Wed Apr 3 20:09:04 EST 1996 kenh@excalibur:/usr/src/sys/arch/i386/compile/EXCALIBUR i386
>Description:
Certain PC BIOSes won't detect 16550 UARTs when the FIFO is enabled. While
this doesn't affect NetBSD, it does present a problem when DOS is booted
after booting NetBSD.
>How-To-Repeat:
Find a PC with a deficient BIOS, boot into NetBSD, then boot into DOS.
Notice that the BIOS doesn't detect com ports with 16550's.
>Fix:
Here's a patch that turns off the FIFO in the device close routine (I'm not
sure if this is a better solution than a shutdown hook).
--- com.c.orig Wed Apr 3 20:01:59 1996
+++ com.c Wed Apr 3 20:08:17 1996
@@ -654,6 +654,14 @@
CLR(tp->t_state, TS_BUSY | TS_FLUSH);
if (--comsopen == 0)
untimeout(compoll, NULL);
+
+ if (ISSET(sc->sc_hwflags, COM_HW_FIFO))
+ /*
+ * Disable the FIFO upon close, as some buggy PC BIOSes
+ * won't detect the UART otherwise
+ */
+ bus_io_write_1(bc, ioh, com_fifo, 0);
+
splx(s);
ttyclose(tp);
#ifdef notyet /* XXXX */
Too many ('s.
>Audit-Trail:
>Unformatted: