mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: linux-serial@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Graf Yang <graf.yang@analog.com>
Subject: [PATCH 2/4] serial: bfin_5xx: need to disable DMA TX interrupt too
Date: Tue, 19 Jan 2010 06:13:11 -0500	[thread overview]
Message-ID: <1263899593-12178-2-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1263899593-12178-1-git-send-email-vapier@gentoo.org>

From: Graf Yang <graf.yang@analog.com>

If we don't disable the DMA TX channel, an inopportune timeout will
trigger the interrupt handler and may cause a dead lock with the spin_lock.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/serial/bfin_5xx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 15843cc..b5a9b37 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -488,6 +488,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
 {
 	int x_pos, pos;
 
+	dma_disable_irq(uart->tx_dma_channel);
 	dma_disable_irq(uart->rx_dma_channel);
 	spin_lock_bh(&uart->port.lock);
 
@@ -521,6 +522,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
 	}
 
 	spin_unlock_bh(&uart->port.lock);
+	dma_enable_irq(uart->tx_dma_channel);
 	dma_enable_irq(uart->rx_dma_channel);
 
 	mod_timer(&(uart->rx_dma_timer), jiffies + DMA_RX_FLUSH_JIFFIES);
-- 
1.6.6


  reply	other threads:[~2010-01-19 11:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-19 11:13 [PATCH 1/4] serial: bfin_5xx: remove useless gpio handling with hard flow control Mike Frysinger
2010-01-19 11:13 ` Mike Frysinger [this message]
2010-01-19 11:13 ` [PATCH 3/4] serial: bfin_5xx: kgdboc should accept gdb break only when it is active Mike Frysinger
2010-01-26  0:11   ` Andrew Morton
2010-01-26  1:57     ` Mike Frysinger
2010-01-19 11:13 ` [PATCH 4/4] serial: bfin_5xx: pull in linux/io.h for ioremap prototypes Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2009-09-17 21:52 [PATCH 1/4] serial: bfin_5xx: remove useless gpio handling with hard flow control Mike Frysinger
2009-09-17 21:52 ` [PATCH 2/4] serial: bfin_5xx: need to disable DMA TX interrupt too Mike Frysinger

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=1263899593-12178-2-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=graf.yang@analog.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®