Subject: COM driver and the ST16C1550
To: None <>
From: Allen Briggs <>
List: tech-kern
Date: 07/09/2001 18:53:03
Hi.  I've been working with the ST16C1550 UART from EXAR.  It is
supposedly 16550-compatible, but it doesn't quite seem to be.  When
operating in interrupt mode, it gets stuck in the receive interrupt
loop because the only interrupt condition is TXRDY.  The following
patch seems to work for me, but I don't know if it will break existing
drivers.  Unfortunately, I don't know any definite way to distinguish
this from a genuine ns16550a...

Index: com.c
RCS file: /cvsroot/syssrc/sys/dev/ic/com.c,v
retrieving revision 1.186
diff -u -r1.186 com.c
--- com.c	2001/06/20 03:07:25	1.186
+++ com.c	2001/07/09 22:35:57
@@ -2011,6 +2011,10 @@
 		u_char	msr, delta;
 		lsr = bus_space_read_1(iot, ioh, com_lsr);
+		if ((iir & IIR_IMASK) == IIR_TXRDY)
+			break;
 		if (ISSET(lsr, LSR_BI)) {
 			int cn_trapped = 0;

Anyone have any thoughts?

In case anyone's interested, the datasheet is available from:


 Allen Briggs               Quality NetBSD CDs, Sales, Support, Service
NetBSD dev. for _your_ Alpha, ARM, M68K, MIPS, PowerPC, SH3, Sparc, x86, etc...