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: 1703 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:54:31 -0000 Delivered-To: patches@linaro.org Received: by 10.52.181.10 with SMTP id ds10cs295264vdc; Wed, 1 Jun 2011 01:50:14 -0700 (PDT) Received: by 10.213.107.7 with SMTP id z7mr250081ebo.128.1306918213994; Wed, 01 Jun 2011 01:50:13 -0700 (PDT) Received: from eu1sys200aog103.obsmtp.com (eu1sys200aog103.obsmtp.com [207.126.144.115]) by mx.google.com with SMTP id z10si2343306eef.79.2011.06.01.01.50.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2011 01:50:13 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.115 is neither permitted nor denied by best guess record for domain of per.forlin@stericsson.com) client-ip=207.126.144.115; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.115 is neither permitted nor denied by best guess record for domain of per.forlin@stericsson.com) smtp.mail=per.forlin@stericsson.com 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 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)) {