aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-04 18:42:21 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-09 22:14:13 -0500
commita0431476e95d18bb65349e7bcf98eb10b5ad00b9 (patch)
treefc736bea45ef5201a541d2c1228f664a137023c2 /drivers/tty
parent3986fb2ba67bb30cac18b0cff48c88d69ad37681 (diff)
serial: make 8250 timeout use the specified IRQ handler
The current 8250 timeout code duplicates the code path in serial8250_default_handle_irq and then serial8250_handle_irq i.e. reading iir, check for IIR_NO_INT, and then calling serial8250_handle_port. So the immediate thought is to replace the duplicated code with a call to serial8250_default_handle_irq. But this highlights a problem. We let 8250 driver variants use their own IRQ handler via specifying their own custom ->handle_irq, but in the event of a timeout, we ignore their handler and implicitly run serial8250_default_handle_irq instead. So, go through the struct to get ->handle_irq and call that, which for most will still be serial8250_default_handle_irq. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index 9c0396fa3915..f1c4f4575426 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
@@ -1740,11 +1740,8 @@ static void serial_unlink_irq_chain(struct uart_8250_port *up)
1740static void serial8250_timeout(unsigned long data) 1740static void serial8250_timeout(unsigned long data)
1741{ 1741{
1742 struct uart_8250_port *up = (struct uart_8250_port *)data; 1742 struct uart_8250_port *up = (struct uart_8250_port *)data;
1743 unsigned int iir;
1744 1743
1745 iir = serial_in(up, UART_IIR); 1744 up->port.handle_irq(&up->port);
1746 if (!(iir & UART_IIR_NO_INT))
1747 serial8250_handle_port(up);
1748 mod_timer(&up->timer, jiffies + uart_poll_timeout(&up->port)); 1745 mod_timer(&up->timer, jiffies + uart_poll_timeout(&up->port));
1749} 1746}
1750 1747