linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hao Liang <hliang1025@gmail.com>
To: <sonic.zhang@analog.com>, <gregkh@linuxfoundation.org>, <jslaby@suse.cz>
Cc: <adi-buildroot-devel@lists.sourceforge.net>,
	<linux-serial@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<hliang1025@gmail.com>
Subject: [PATCH] bfin uart: it will hang when read current y count if not disable dma irq
Date: Thu, 26 Mar 2015 17:13:24 +0800	[thread overview]
Message-ID: <1427361205-31801-1-git-send-email-hliang1025@gmail.com> (raw)

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


                 reply	other threads:[~2015-03-26  9:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427361205-31801-1-git-send-email-hliang1025@gmail.com \
    --to=hliang1025@gmail.com \
    --cc=adi-buildroot-devel@lists.sourceforge.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=sonic.zhang@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).