aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/8250.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-09-10 11:36:13 +1000
committerPaul Mackerras <paulus@samba.org>2008-09-10 11:36:13 +1000
commit7e392f8c29ee045c6a29d50193d2fb10712eceb0 (patch)
treec84097fe644c50c82f087ab7fa2d75167b8c0e16 /drivers/serial/8250.c
parentpowerpc: Remove include of linux/of_device.h from asm/of_device.h (diff)
parentMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip (diff)
downloadlinux-dev-7e392f8c29ee045c6a29d50193d2fb10712eceb0.tar.xz
linux-dev-7e392f8c29ee045c6a29d50193d2fb10712eceb0.zip
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r--drivers/serial/8250.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 342e12fb1c25..9ccc563d8730 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1908,15 +1908,23 @@ static int serial8250_startup(struct uart_port *port)
* kick the UART on a regular basis.
*/
if (!(iir1 & UART_IIR_NO_INT) && (iir & UART_IIR_NO_INT)) {
+ up->bugs |= UART_BUG_THRE;
pr_debug("ttyS%d - using backup timer\n", port->line);
- up->timer.function = serial8250_backup_timeout;
- up->timer.data = (unsigned long)up;
- mod_timer(&up->timer, jiffies +
- poll_timeout(up->port.timeout) + HZ / 5);
}
}
/*
+ * The above check will only give an accurate result the first time
+ * the port is opened so this value needs to be preserved.
+ */
+ if (up->bugs & UART_BUG_THRE) {
+ up->timer.function = serial8250_backup_timeout;
+ up->timer.data = (unsigned long)up;
+ mod_timer(&up->timer, jiffies +
+ poll_timeout(up->port.timeout) + HZ / 5);
+ }
+
+ /*
* If the "interrupt" for this port doesn't correspond with any
* hardware interrupt, we use a timer-based system. The original
* driver used to do this with IRQ0.