* [PATCH] bfin uart: it will hang when read current y count if not disable dma irq
@ 2015-03-26 9:13 ` Hao Liang
0 siblings, 0 replies; 2+ messages in thread
From: Hao Liang @ 2015-03-26 9:13 UTC (permalink / raw)
To: sonic.zhang, gregkh, jslaby
Cc: adi-buildroot-devel, linux-serial, linux-kernel, hliang1025
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>
---
drivers/tty/serial/bfin_uart.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c
index 43b3e2c..155781e 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)
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);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] bfin uart: it will hang when read current y count if not disable dma irq
@ 2015-03-26 9:13 ` Hao Liang
0 siblings, 0 replies; 2+ messages in thread
From: Hao Liang @ 2015-03-26 9:13 UTC (permalink / raw)
To: sonic.zhang, gregkh, jslaby
Cc: adi-buildroot-devel, linux-serial, linux-kernel, hliang1025
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>
---
drivers/tty/serial/bfin_uart.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c
index 43b3e2c..155781e 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)
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);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-26 9:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26 9:13 [PATCH] bfin uart: it will hang when read current y count if not disable dma irq Hao Liang
2015-03-26 9:13 ` Hao Liang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.