[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1427361205-31801-1-git-send-email-hliang1025@gmail.com>
Date: Thu, 26 Mar 2015 17:13:24 +0800
From: Hao Liang <hliang1025@...il.com>
To: <sonic.zhang@...log.com>, <gregkh@...uxfoundation.org>,
<jslaby@...e.cz>
CC: <adi-buildroot-devel@...ts.sourceforge.net>,
<linux-serial@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<hliang1025@...il.com>
Subject: [PATCH] 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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists