svn commit: r227032 - head/sys/dev/uart
Olivier Houchard
cognet at FreeBSD.org
Wed Nov 2 20:45:44 UTC 2011
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)
More information about the svn-src-head
mailing list