Subject: Data in the FIFO (sys/dev/isa/com.c) causing a hard hang
To: None <tech-kern@NetBSD.ORG>
From: Scott Reynolds <>
List: tech-kern
Date: 05/03/1995 10:09:29
I've been looking into a problem that I have with booting NetBSD/i386 
when a Logitech MouseMan CR-32 3-button mouse is plugged into the serial 
port.  As it turns out, I tracked it to the first time comopen() is 
called on that particular port; subsequent opens run just fine, and if 
you unplug the mouse before you cold boot it will work just fine if you 
plug it in after 'ttyflags -a' is run.

In comopen() I further traced the problem to a hang on the splx() at the 
end of the function.  This hang occurs if there is data in the receive 
buffer (LSR_RXRDY is set in the line status).  Can someone suggest the 
canonical method to flush the receive FIFO, if such a method exists?  I'd 
like to do this in comopen(), ideally, but I'm open to suggestion.