Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756380Ab0ASLNO (ORCPT ); Tue, 19 Jan 2010 06:13:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755394Ab0ASLNL (ORCPT ); Tue, 19 Jan 2010 06:13:11 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:40538 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755762Ab0ASLNF (ORCPT ); Tue, 19 Jan 2010 06:13:05 -0500 From: Mike Frysinger To: linux-serial@vger.kernel.org, Alan Cox Cc: linux-kernel@vger.kernel.org, Andrew Morton , Graf Yang Subject: [PATCH 2/4] serial: bfin_5xx: need to disable DMA TX interrupt too Date: Tue, 19 Jan 2010 06:13:11 -0500 Message-Id: <1263899593-12178-2-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.6.6 In-Reply-To: <1263899593-12178-1-git-send-email-vapier@gentoo.org> References: <1263899593-12178-1-git-send-email-vapier@gentoo.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1291 Lines: 39 From: Graf Yang 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 Signed-off-by: Mike Frysinger --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/