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: 833882 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4VKY7Kt002604 for ; Tue, 31 May 2011 20:34:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758298Ab1EaUeJ (ORCPT ); Tue, 31 May 2011 16:34:09 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:62419 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758244Ab1EaUeI (ORCPT ); Tue, 31 May 2011 16:34:08 -0400 Received: by mail-ey0-f174.google.com with SMTP id 24so1794491eyx.19 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> 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 (demeter2.kernel.org [140.211.167.43]); Tue, 31 May 2011 20:34:10 +0000 (UTC) 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)) {