From patchwork Wed Jun 1 08:48:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Per Forlin X-Patchwork-Id: 837272 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p518oNoF019726 for ; Wed, 1 Jun 2011 08:50:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161786Ab1FAIuR (ORCPT ); Wed, 1 Jun 2011 04:50:17 -0400 Received: from eu1sys200aog103.obsmtp.com ([207.126.144.115]:52493 "EHLO eu1sys200aog103.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162434Ab1FAIuO (ORCPT ); Wed, 1 Jun 2011 04:50:14 -0400 Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob103.postini.com ([207.126.147.11]) with SMTP ID DSNKTeX9PqbFsgINS/ImCDzl4NUsYLljJu1o@postini.com; Wed, 01 Jun 2011 08:50:13 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 94C85168; Wed, 1 Jun 2011 08:49:41 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 995E925FA; Wed, 1 Jun 2011 08:49:39 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id BAA90A8065; Wed, 1 Jun 2011 10:49:34 +0200 (CEST) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 1 Jun 2011 10:49:38 +0200 From: Per Forlin To: , , Nicolas Pitre , , Daniel Drake , Linus Walleij Cc: Chris Ball , Per Forlin Subject: [PATCH v2 2/2] sdio: report error if pending IRQ but none CCCR_INTx bits Date: Wed, 1 Jun 2011 10:48:33 +0200 Message-ID: <1306918113-23872-3-git-send-email-per.forlin@stericsson.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1306918113-23872-2-git-send-email-per.forlin@stericsson.com> References: <1306918113-23872-1-git-send-email-per.forlin@stericsson.com> <1306918113-23872-2-git-send-email-per.forlin@stericsson.com> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 01 Jun 2011 08:50:23 +0000 (UTC) From: Per Forlin Return error in case of pending IRQ but none functions bits in CCCR_INTx are set. Signed-off-by: Per Forlin --- drivers/mmc/core/sdio_irq.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index df1e946..4288d92 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -50,6 +50,11 @@ static int process_sdio_pending_irqs(struct mmc_card *card) return ret; } + if (!pending) { + printk(KERN_WARNING "%s: pending IRQ but none function bits\n", + mmc_card_id(card)); + ret = -EINVAL; + } count = 0; for (i = 1; i <= 7; i++) { if (pending & (1 << i)) {