summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2016-01-30 09:11:46 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-06 23:13:30 -0800
commitfff21fac75ccebacd29fc16b56a46a124359917a (patch)
tree9a311ac2a5a74f975e8f8bf8f8c17f2d95b036fd /drivers/tty
parentbdc5f300958062a766518b81d5378f837149d5c1 (diff)
downloadop-kernel-dev-fff21fac75ccebacd29fc16b56a46a124359917a.zip
op-kernel-dev-fff21fac75ccebacd29fc16b56a46a124359917a.tar.gz
serial: zs: Fix a transmit lockup in console output
Transmit interrupts are disabled and the transmit buffer drained in the course of console output so that polled transmission is possible. That however causes a lost transmit interrupt as the TxIP bit in RR3 is only set on a transmit buffer full-to-empty transition and then iff transmit interrupts are enabled at the same time. Consequently if console output disturbs a regular transmission in progress, the TxIP bit is never set again and the transmission locks up waiting for a transmit interrupt. Fix the problem by restarting transmission manually rather than waiting for a transmit interrupt that will never happen. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/zs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/zs.c b/drivers/tty/serial/zs.c
index 2b65bb7..eeefd76 100644
--- a/drivers/tty/serial/zs.c
+++ b/drivers/tty/serial/zs.c
@@ -1181,6 +1181,10 @@ static void zs_console_write(struct console *co, const char *s,
if (txint & TxINT_ENAB) {
zport->regs[1] |= TxINT_ENAB;
write_zsreg(zport, R1, zport->regs[1]);
+
+ /* Resume any transmission as the TxIP bit won't be set. */
+ if (!zport->tx_stopped)
+ zs_raw_transmit_chars(zport);
}
spin_unlock_irqrestore(&scc->zlock, flags);
}
OpenPOWER on IntegriCloud