diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2012-03-27 12:22:49 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-27 09:51:05 -0700 |
commit | d9d0d9edd528ea9a30b6b469b230a45accd4f4ba (patch) | |
tree | fa9e90b62ef88efd1fe6fb0bef834b85512a3bad | |
parent | c7a17402276938793a8e97fe7eefe28eb39fe874 (diff) | |
download | kernel_samsung_crespo-d9d0d9edd528ea9a30b6b469b230a45accd4f4ba.zip kernel_samsung_crespo-d9d0d9edd528ea9a30b6b469b230a45accd4f4ba.tar.gz kernel_samsung_crespo-d9d0d9edd528ea9a30b6b469b230a45accd4f4ba.tar.bz2 |
ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR
commit 7a6fbc9a887193a1e9f8658703881c528040afbc upstream.
Since 2.6.30-rc1 clps711x serial driver hungs system. This is a result
of call disable_irq from ISR. synchronize_irq waits for end of interrupt
and goes to infinite loop. This patch fix this problem.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/clps711x.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c index e6c3dbd..836fe273 100644 --- a/drivers/tty/serial/clps711x.c +++ b/drivers/tty/serial/clps711x.c @@ -154,10 +154,9 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id) port->x_char = 0; return IRQ_HANDLED; } - if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { - clps711xuart_stop_tx(port); - return IRQ_HANDLED; - } + + if (uart_circ_empty(xmit) || uart_tx_stopped(port)) + goto disable_tx_irq; count = port->fifosize >> 1; do { @@ -171,8 +170,11 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(port); - if (uart_circ_empty(xmit)) - clps711xuart_stop_tx(port); + if (uart_circ_empty(xmit)) { + disable_tx_irq: + disable_irq_nosync(TX_IRQ(port)); + tx_enabled(port) = 0; + } return IRQ_HANDLED; } |