From patchwork Mon Apr 6 12:01:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 16514 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n36C1Ab5029362 for ; Mon, 6 Apr 2009 12:01:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755525AbZDFMBH (ORCPT ); Mon, 6 Apr 2009 08:01:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755505AbZDFMBH (ORCPT ); Mon, 6 Apr 2009 08:01:07 -0400 Received: from smtp.nokia.com ([192.100.105.134]:47091 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755481AbZDFMBG (ORCPT ); Mon, 6 Apr 2009 08:01:06 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx09.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n36C0WYd013516; Mon, 6 Apr 2009 07:00:53 -0500 Received: from vaepf101.NOE.Nokia.com ([10.160.244.86]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 6 Apr 2009 15:00:19 +0300 Received: from [172.21.41.224] ([172.21.41.224]) by vaepf101.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 6 Apr 2009 15:00:19 +0300 Message-ID: <49D9EF0F.9090808@nokia.com> Date: Mon, 06 Apr 2009 15:01:19 +0300 From: Adrian Hunter User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Pierre Ossman CC: LKML , Kevin Hilman , Tony Lindgren , linux-omap Mailing List Subject: [PATCH] omap_hsmmc: Flush posted write to IRQ X-OriginalArrivalTime: 06 Apr 2009 12:00:19.0509 (UTC) FILETIME=[41BB3650:01C9B6AF] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Kevin Hilman Spurious IRQs seen on MMC after 2.6.29. Flush posted write in IRQ handler. The interrupt line is released by clearing the error status bits in the MMCHS_STAT register, which must occur before the interrupt handler returns to avoid unwanted irqs. Hence the need to flush the posted write. Signed-off-by: Kevin Hilman Signed-off-by: Adrian Hunter Acked-by: Tony Lindgen --- This patch is slightly modified from Kevin's original, which is here: http://marc.info/?l=linux-omap&m=123862814815052&w=2 drivers/mmc/host/omap_hsmmc.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 04e5a0c..2ae6049 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -452,6 +452,8 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) if (host->mrq == NULL) { OMAP_HSMMC_WRITE(host->base, STAT, OMAP_HSMMC_READ(host->base, STAT)); + /* Flush posted write */ + OMAP_HSMMC_READ(host->base, STAT); return IRQ_HANDLED; } @@ -523,6 +525,8 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) } OMAP_HSMMC_WRITE(host->base, STAT, status); + /* Flush posted write */ + OMAP_HSMMC_READ(host->base, STAT); if (end_cmd || (status & CC)) mmc_omap_cmd_done(host, host->cmd);