From patchwork Tue May 31 20:33:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Per Forlin X-Patchwork-Id: 1688 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:25 -0000 Delivered-To: patches@linaro.org Received: by 10.52.110.9 with SMTP id hw9cs311768vdb; Tue, 31 May 2011 13:34:10 -0700 (PDT) Received: by 10.213.1.144 with SMTP id 16mr1544605ebf.113.1306874049732; Tue, 31 May 2011 13:34:09 -0700 (PDT) Received: from mail-ew0-f50.google.com (mail-ew0-f50.google.com [209.85.215.50]) by mx.google.com with ESMTPS id x46si1304180eea.8.2011.05.31.13.34.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 May 2011 13:34:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.50 is neither permitted nor denied by best guess record for domain of per.forlin@linaro.org) client-ip=209.85.215.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.215.50 is neither permitted nor denied by best guess record for domain of per.forlin@linaro.org) smtp.mail=per.forlin@linaro.org Received: by mail-ew0-f50.google.com with SMTP id 10so1955334ewy.37 for ; Tue, 31 May 2011 13:34:08 -0700 (PDT) Received: by 10.213.105.146 with SMTP id t18mr1550453ebo.86.1306874048226; Tue, 31 May 2011 13:34:08 -0700 (PDT) Received: from localhost.localdomain (c-3c7b71d5.029-82-6c756e10.cust.bredbandsbolaget.se [213.113.123.60]) by mx.google.com with ESMTPS id z1sm264420eeb.6.2011.05.31.13.34.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 May 2011 13:34:07 -0700 (PDT) From: Per Forlin To: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Pitre , linaro-dev@lists.linaro.org, Daniel Drake Cc: Chris Ball , Per Forlin Subject: [PATCH 2/2] sdio: report error if pending IRQ but none function bits Date: Tue, 31 May 2011 22:33:28 +0200 Message-Id: <1306874008-28867-3-git-send-email-per.forlin@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1306874008-28867-1-git-send-email-per.forlin@linaro.org> References: <1306874008-28867-1-git-send-email-per.forlin@linaro.org> Return error in case of pending IRQ but none functions bits in CCCR_INTx is 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 2f81ddc..8184b6e 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)) {