diff options
author | Hao Liang <hliang1025@gmail.com> | 2015-03-26 05:13:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 11:10:10 -0400 |
commit | 1569039db0062c47c97ca0bf0c86210d26b8f412 (patch) | |
tree | 23dd9b1536c02071f97d6756bfbbb95c48b8ff3b | |
parent | da29169e769285e90bd1f8389c78b2da6e7fa910 (diff) |
bfin uart: it will hang when read current y count if not disable dma irq
Add irq disable and enable in bfin_serial_rx_dma_timeout in case of
system hang.
This reverts part of commit 9642dbe73c8a ("serial: bfin-uart: avoid
dead lock in rx irq handler in smp kernel").
Signed-off-by: Hao Liang <hliang1025@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/bfin_uart.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c index 43b3e2c233ff..155781ece050 100644 --- a/drivers/tty/serial/bfin_uart.c +++ b/drivers/tty/serial/bfin_uart.c | |||
@@ -464,6 +464,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart) | |||
464 | int x_pos, pos; | 464 | int x_pos, pos; |
465 | unsigned long flags; | 465 | unsigned long flags; |
466 | 466 | ||
467 | dma_disable_irq_nosync(uart->rx_dma_channel); | ||
467 | spin_lock_irqsave(&uart->rx_lock, flags); | 468 | spin_lock_irqsave(&uart->rx_lock, flags); |
468 | 469 | ||
469 | /* 2D DMA RX buffer ring is used. Because curr_y_count and | 470 | /* 2D DMA RX buffer ring is used. Because curr_y_count and |
@@ -496,6 +497,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart) | |||
496 | } | 497 | } |
497 | 498 | ||
498 | spin_unlock_irqrestore(&uart->rx_lock, flags); | 499 | spin_unlock_irqrestore(&uart->rx_lock, flags); |
500 | dma_enable_irq(uart->rx_dma_channel); | ||
499 | 501 | ||
500 | mod_timer(&(uart->rx_dma_timer), jiffies + DMA_RX_FLUSH_JIFFIES); | 502 | mod_timer(&(uart->rx_dma_timer), jiffies + DMA_RX_FLUSH_JIFFIES); |
501 | } | 503 | } |