mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 00:53:40 +00:00
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 9642dbe73c
("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>
This commit is contained in:
parent
da29169e76
commit
1569039db0
@ -464,6 +464,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
|
||||
int x_pos, pos;
|
||||
unsigned long flags;
|
||||
|
||||
dma_disable_irq_nosync(uart->rx_dma_channel);
|
||||
spin_lock_irqsave(&uart->rx_lock, flags);
|
||||
|
||||
/* 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)
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&uart->rx_lock, flags);
|
||||
dma_enable_irq(uart->rx_dma_channel);
|
||||
|
||||
mod_timer(&(uart->rx_dma_timer), jiffies + DMA_RX_FLUSH_JIFFIES);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user