Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Nov 2011 20:45:44 +0000 (UTC)
From:      Olivier Houchard <cognet@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227032 - head/sys/dev/uart
Message-ID:  <201111022045.pA2KjiYS037588@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cognet
Date: Wed Nov  2 20:45:44 2011
New Revision: 227032
URL: http://svn.freebsd.org/changeset/base/227032

Log:
  Disable the TX ready interrupts once we received one, some UART won't clear
  the IIR_TXRDY bit upon reading.
  
  Reviewed by:	marcel

Modified:
  head/sys/dev/uart/uart_dev_ns8250.c

Modified: head/sys/dev/uart/uart_dev_ns8250.c
==============================================================================
--- head/sys/dev/uart/uart_dev_ns8250.c	Wed Nov  2 20:11:19 2011	(r227031)
+++ head/sys/dev/uart/uart_dev_ns8250.c	Wed Nov  2 20:45:44 2011	(r227032)
@@ -582,9 +582,11 @@ static int
 ns8250_bus_ipend(struct uart_softc *sc)
 {
 	struct uart_bas *bas;
+	struct ns8250_softc *ns8250;
 	int ipend;
 	uint8_t iir, lsr;
 
+	ns8250 = (struct ns8250_softc *)sc;
 	bas = &sc->sc_bas;
 	uart_lock(sc->sc_hwmtx);
 	iir = uart_getreg(bas, REG_IIR);
@@ -602,9 +604,10 @@ ns8250_bus_ipend(struct uart_softc *sc)
 		if (lsr & LSR_RXRDY)
 			ipend |= SER_INT_RXREADY;
 	} else {
-		if (iir & IIR_TXRDY)
+		if (iir & IIR_TXRDY) {
 			ipend |= SER_INT_TXIDLE;
-		else
+			uart_setreg(bas, REG_IER, ns8250->ier);
+		} else
 			ipend |= SER_INT_SIGCHG;
 	}
 	if (ipend == 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111022045.pA2KjiYS037588>