[linux-yocto] [PATCH 2/2] valleyisland-io: mmc: sdhci: fix continuous warning prints in ISR

rebecca.swee.fun.chang at intel.com rebecca.swee.fun.chang at intel.com
Wed Mar 12 03:54:02 PDT 2014


From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>

Add a patch to fix continuous warning prints in ISR if shared interrupt.
sdhc host may share same interrupt line with other IO devices that
trigger interrupt frequently, like USB. In this case, we encountered
continous prints of warning message "got irq while runtime suspended"
when the interrupt triggered by other IO devices sharing the same line.
To avoid this scenario, first check the interrupt everytime ISR enters.

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>
---
 ...ix-continuous-warning-prints-in-ISR-if-sh.patch |   55 ++++++++++++++++++++
 .../features/valleyisland-io/valleyisland-io.scc   |    1 +
 2 files changed, 56 insertions(+)
 create mode 100644 meta/cfg/kernel-cache/features/valleyisland-io/0025-mmc-sdhci-Fix-continuous-warning-prints-in-ISR-if-sh.patch

diff --git a/meta/cfg/kernel-cache/features/valleyisland-io/0025-mmc-sdhci-Fix-continuous-warning-prints-in-ISR-if-sh.patch b/meta/cfg/kernel-cache/features/valleyisland-io/0025-mmc-sdhci-Fix-continuous-warning-prints-in-ISR-if-sh.patch
new file mode 100644
index 0000000..937ef7d
--- /dev/null
+++ b/meta/cfg/kernel-cache/features/valleyisland-io/0025-mmc-sdhci-Fix-continuous-warning-prints-in-ISR-if-sh.patch
@@ -0,0 +1,55 @@
+From 01276b4a05ec43688adbaac331d2c1bb1022d06b Mon Sep 17 00:00:00 2001
+From: Maurice Petallo <mauricex.r.petallo at intel.com>
+Date: Thu, 6 Feb 2014 18:02:58 +0800
+Subject: [PATCH] mmc: sdhci: Fix continuous warning prints in ISR if shared
+ interrupt
+
+sdhc host may share same interrupt line with other IO devices that
+trigger interrupt frequently, like USB. In this case, we encountered
+continous prints of warning message "got irq while runtime suspended"
+when the interrupt triggered by other IO devices sharing the same line.
+To avoid this scenario, first check the interrupt everytime ISR enters.
+
+Signed-off-by: Maurice Petallo <mauricex.r.petallo at intel.com>
+Change-Id: I655a0cf8b31fc8b6524237432281f972e2e09b36
+Reviewed-on: http://git-gar-1.devtools.intel.com/gerrit/1349
+Reviewed-by: Chew, Chiau Ee <chiau.ee.chew at intel.com>
+---
+ drivers/mmc/host/sdhci.c |   14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
+index 0a0d426..8805d3f 100644
+--- a/drivers/mmc/host/sdhci.c
++++ b/drivers/mmc/host/sdhci.c
+@@ -2349,13 +2349,6 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
+ 
+ 	spin_lock(&host->lock);
+ 
+-	if (host->runtime_suspended) {
+-		spin_unlock(&host->lock);
+-		pr_warning("%s: got irq while runtime suspended\n",
+-		       mmc_hostname(host->mmc));
+-		return IRQ_HANDLED;
+-	}
+-
+ 	intmask = sdhci_readl(host, SDHCI_INT_STATUS);
+ 
+ 	if (!intmask || intmask == 0xffffffff) {
+@@ -2363,6 +2356,13 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
+ 		goto out;
+ 	}
+ 
++	if (host->runtime_suspended) {
++		spin_unlock(&host->lock);
++		pr_warning("%s: got irq while runtime suspended\n",
++		       mmc_hostname(host->mmc));
++		return IRQ_HANDLED;
++	}
++
+ again:
+ 	DBG("*** %s got interrupt: 0x%08x\n",
+ 		mmc_hostname(host->mmc), intmask);
+-- 
+1.7.10.4
+
diff --git a/meta/cfg/kernel-cache/features/valleyisland-io/valleyisland-io.scc b/meta/cfg/kernel-cache/features/valleyisland-io/valleyisland-io.scc
index 7b46285..dde247b 100644
--- a/meta/cfg/kernel-cache/features/valleyisland-io/valleyisland-io.scc
+++ b/meta/cfg/kernel-cache/features/valleyisland-io/valleyisland-io.scc
@@ -25,3 +25,4 @@ patch 0021-gpio-baytrail-add-function-mux-checking-in-gpio-pin-.patch
 patch 0022-gpio-baytrail-unmap-interrupt-when-free-the-gpio-pin.patch
 patch 0023-gpio-baytrail-enable-platform-device-in-the-absent-o.patch
 patch 0024-gpio-baytrail-setup-IOAPIC-interrupt-for-GPIO.patch
+patch 0025-mmc-sdhci-Fix-continuous-warning-prints-in-ISR-if-sh.patch
-- 
1.7.10.4



More information about the linux-yocto mailing list