From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752558AbbCZJcH (ORCPT ); Thu, 26 Mar 2015 05:32:07 -0400 Received: from mail-by2on0053.outbound.protection.outlook.com ([207.46.100.53]:34176 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751830AbbCZJcD (ORCPT ); Thu, 26 Mar 2015 05:32:03 -0400 X-Greylist: delayed 869 seconds by postgrey-1.27 at vger.kernel.org; Thu, 26 Mar 2015 05:32:03 EDT From: Hao Liang To: , , CC: , , , 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 Message-ID: <1427361205-31801-1-git-send-email-hliang1025@gmail.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Matching-Connectors: 130718350521429892;(52f37747-95c3-483a-bd05-08d153b03fac);() Authentication-Results: spf=softfail (sender IP is 137.71.25.55) smtp.mailfrom=hliang1025@gmail.com; suse.cz; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:137.71.25.55;CTRY:US;IPV:NLI;EFV:NLI;BMV:1;SFV:NSPM;SFS:(10009020)(6009001)(199003)(189002)(50986999)(87572001)(47776003)(61266001)(46102003)(229853001)(106466001)(87936001)(86362001)(19580405001)(19580395003)(50226001)(33646002)(83322999)(105596002)(50466002)(48376002)(87792001)(62966003)(77096005)(73392002)(55446002)(73972006)(76482003)(77156002)(81442002)(82202001)(92566002)(2201001)(36756003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB0766;H:nwd2mta1.analog.com;FPR:;SPF:SoftFail;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0766; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:DM2PR0301MB0766;BCL:0;PCL:0;RULEID:(400005)(401004);SRVR:DM2PR0301MB0766; X-Forefront-PRVS: 0527DFA348 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2015 09:17:32.0337 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[137.71.25.55];Helo=[nwd2mta1.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0766 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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