aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/8250.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-10 09:09:51 +0200
committerIngo Molnar <mingo@elte.hu>2008-09-10 09:09:51 +0200
commit6003ab0bad4cc56f3c4fadf62a0d23a967b9c53b (patch)
tree2087ca69776116b70a6af0daae9c10bfac1aa347 /drivers/serial/8250.c
parentab7476cf76e560f0efda2a631a70aabe93009025 (diff)
parentadee14b2e1557d0a8559f29681732d05a89dfc35 (diff)
Merge branch 'linus' into core/debug
Conflicts: lib/vsprintf.c Manual merge: include/linux/kernel.h Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 342e12fb1c2..9ccc563d873 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.