Subject: Re: Some interrupt loss with a 16450 UART
To: Frederic Loyer <loyer@ensta.fr>
From: Stefan Grefen <grefen@convex.com>
List: port-i386
Date: 11/09/1994 10:41:12
In message <199411081830.TAA00342@bsd6.ensta.fr>  Frederic Loyer wrote:
> 
> I've used PPP with a 486DX2/66, and a 16450 UART: that's work fine for
> a while (with a lot of silo overflow), and then NetBSD stop sending
> characters from the output queue until I kill pppd.

I've seen this problem too, and it's a bug in the 16450 CHIP (I`ve seen
code to work around that problem in other OSs too.
This only hppens if a TX and a RX interrupt happen at (nearly) the same time.

I've also a patch for this which is part of the PCMCIA modem driver-patch to
com.c.
I added a check in the interrupthandler to figure if a outgoing character is 
on the UART, and if it is it checks the UART if the character is still 
transmitted, if not an TX interrupt is faked.

One of this patches should go to the main NetBSD-tree, there are still some
systems were you can't switch chips (like on my laptop). 

Stefan

> 
> With a 16550 UART, I have not seen any problem.
> 
> 
> The following patch work fine and "restart" the com driver when no
> interruption is received and a character has just been sent.

[... Patch deleted]

>  ___  ________ _      |  Frederic Loyer
> | __\| _|_   _/ \     |  Ecole Nationale Superieure
> | __\____ | |/ _ \    |  de Techniques Avancees
> |___\_____|___/ \_\   |  e-mail : loyer@ensta.fr
> 

--
Stefan Grefen                          Convex Computer GmbH, Frankfurt, Germany
grefen@convex.com		       Phone: +49-69-665270
fortune: "You can't make a program without broken egos."