From patchwork Wed Jan 30 08:59:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Liu X-Patchwork-Id: 2066311 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B233FDF264 for ; Wed, 30 Jan 2013 08:58:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752651Ab3A3I6z (ORCPT ); Wed, 30 Jan 2013 03:58:55 -0500 Received: from na3sys009aog103.obsmtp.com ([74.125.149.71]:60204 "EHLO na3sys009aog103.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752422Ab3A3I6z (ORCPT ); Wed, 30 Jan 2013 03:58:55 -0500 Received: from MSI-MTA.marvell.com ([65.219.4.132]) (using TLSv1) by na3sys009aob103.postini.com ([74.125.148.12]) with SMTP ID DSNKUQjgupuHi3sfWNgVLvgBXitlIt//okz+@postini.com; Wed, 30 Jan 2013 00:58:55 PST Received: from maili.marvell.com ([10.68.76.210]) by MSI-MTA.marvell.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 30 Jan 2013 00:58:28 -0800 Received: from kliu5-desktop.marvell.com (unknown [10.38.36.240]) by maili.marvell.com (Postfix) with ESMTP id 6CEFA4E513; Wed, 30 Jan 2013 00:58:23 -0800 (PST) From: Kevin Liu To: linux-mmc@vger.kernel.org, Chris Ball , Sujit Reddy Thumma , Jaehoon Chung , Andy Shevchenko , Aaron Lu , Ulf Hansson , Alexander Stein Cc: Nicolas Pitre , Adrian Hunter , Philip Rakity , Shawn Guo , Johan Rudholm , Daniel Drake , Guennadi Liakhovetski , Jerry Huang , Girish K S , Haijun Zhang , Viresh Kumar , Heiko Stuebner , Thomas Abraham , Chander Kashyap , Sebastian Hesselbarth , Zhangfei Gao , Haojian Zhuang , Chao Xie , Kevin Liu , Kevin Liu , Jialing Fu Subject: [PATCH 1/7] mmc: sdhci: avoid redundant loops in sdhci_irq for card int Date: Wed, 30 Jan 2013 16:59:42 +0800 Message-Id: <1359536388-7896-2-git-send-email-kliu5@marvell.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359536388-7896-1-git-send-email-kliu5@marvell.com> References: <1359536388-7896-1-git-send-email-kliu5@marvell.com> X-OriginalArrivalTime: 30 Jan 2013 08:58:28.0616 (UTC) FILETIME=[F8965080:01CDFEC7] Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org After cleared the handled irq status, sdhci_irq will check the interrupt status again at end. And it will loop back to handle the irq if any new interrupts happened. But card int will keep active all the time since its status is readonly and can't be cleared at that time. So in case card int happend, the function will be looped with max_loops (16 times). Signed-off-by: Kevin Liu Signed-off-by: Jialing Fu --- drivers/mmc/host/sdhci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 3bb9b88..664650b 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2431,6 +2431,8 @@ again: result = IRQ_HANDLED; intmask = sdhci_readl(host, SDHCI_INT_STATUS); + if (cardint) + intmask &= ~SDHCI_INT_CARD_INT; if (intmask && --max_loops) goto again; out: