linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock
@ 2009-11-13  8:02 Simon Kagstrom
  2009-11-13  9:59 ` Russell King - ARM Linux
  2009-11-13 10:57 ` Ben Dooks
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Kagstrom @ 2009-11-13  8:02 UTC (permalink / raw)
  To: linux-arm-kernel

The console hangs during bootup when disable_irq is called from the
transmit interrupt handler (it will wait forever for it's "own"
interrupt in synchronize_irq). Fix by using disable_irq_nosync()
instead.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
---
Russell: This patch is a bit of RFC since I'm not quite sure that it's the correct
solution. It unbreaks booting on our footbridge-based platform. Let me
know if I should look at other solutions!

 drivers/serial/21285.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index 1e3d193..8681f13 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -58,7 +58,7 @@ static const char serial21285_name[] = "Footbridge UART";
 static void serial21285_stop_tx(struct uart_port *port)
 {
 	if (tx_enabled(port)) {
-		disable_irq(IRQ_CONTX);
+		disable_irq_nosync(IRQ_CONTX);
 		tx_enabled(port) = 0;
 	}
 }
@@ -74,7 +74,7 @@ static void serial21285_start_tx(struct uart_port *port)
 static void serial21285_stop_rx(struct uart_port *port)
 {
 	if (rx_enabled(port)) {
-		disable_irq(IRQ_CONRX);
+		disable_irq_nosync(IRQ_CONRX);
 		rx_enabled(port) = 0;
 	}
 }
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-10 12:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13  8:02 [PATCH] serial21285: fix disable_irq-from-interrupt-handler deadlock Simon Kagstrom
2009-11-13  9:59 ` Russell King - ARM Linux
2009-11-13 10:08   ` Simon Kagstrom
2009-12-17  7:51   ` Simon Kagstrom
2010-01-10 12:26     ` Russell King - ARM Linux
2009-11-13 10:57 ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).