diff options
| author | Alexander Shiyan <shc_work@mail.ru> | 2012-03-27 04:22:49 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-27 12:51:05 -0400 |
| commit | d9d0d9edd528ea9a30b6b469b230a45accd4f4ba (patch) | |
| tree | fa9e90b62ef88efd1fe6fb0bef834b85512a3bad /drivers/tty/serial | |
| parent | c7a17402276938793a8e97fe7eefe28eb39fe874 (diff) | |
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>
Diffstat (limited to 'drivers/tty/serial')
| -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 e6c3dbd781d..836fe273123 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) | |||
| 154 | port->x_char = 0; | 154 | port->x_char = 0; |
| 155 | return IRQ_HANDLED; | 155 | return IRQ_HANDLED; |
| 156 | } | 156 | } |
| 157 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | 157 | |
| 158 | clps711xuart_stop_tx(port); | 158 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) |
| 159 | return IRQ_HANDLED; | 159 | goto disable_tx_irq; |
| 160 | } | ||
| 161 | 160 | ||
| 162 | count = port->fifosize >> 1; | 161 | count = port->fifosize >> 1; |
| 163 | do { | 162 | do { |
| @@ -171,8 +170,11 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id) | |||
| 171 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) | 170 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) |
| 172 | uart_write_wakeup(port); | 171 | uart_write_wakeup(port); |
| 173 | 172 | ||
| 174 | if (uart_circ_empty(xmit)) | 173 | if (uart_circ_empty(xmit)) { |
| 175 | clps711xuart_stop_tx(port); | 174 | disable_tx_irq: |
| 175 | disable_irq_nosync(TX_IRQ(port)); | ||
| 176 | tx_enabled(port) = 0; | ||
| 177 | } | ||
| 176 | 178 | ||
| 177 | return IRQ_HANDLED; | 179 | return IRQ_HANDLED; |
| 178 | } | 180 | } |
