summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/files/0001-sdhci-fix-Timeout-error-messages.patch
blob: 9e42dbda9d3893516d23547ec36a75469bfd9688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 34a06b51a1928ed1692da4fce9f2203dfd306648 Mon Sep 17 00:00:00 2001
From: "Maxin B. John" <maxin.john@enea.com>
Date: Tue, 22 Apr 2014 07:26:59 +0200
Subject: [PATCH] sdhci: fix Timeout error messages

If the driver doesn't implement proper card detection,
we shouldn't flood the console with Timeout error messages

Upstream-Status: Pending

Signed-off-by: Maxin B. John <maxin.john@enea.com>
---
 drivers/mmc/host/sdhci.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 79db375..c77117c 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2149,10 +2149,13 @@ static void sdhci_timeout_timer(unsigned long data)
 	spin_lock_irqsave(&host->lock, flags);
 
 	if (host->mrq) {
-		pr_err("%s: Timeout waiting for hardware "
+		/* If the driver doesn't implement proper card detection,
+		we shouldn't flood the console with Timeout error messages */
+		if (!(host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)) {
+			pr_err("%s: Timeout waiting for hardware "
 			"interrupt.\n", mmc_hostname(host->mmc));
-		sdhci_dumpregs(host);
-
+			sdhci_dumpregs(host);
+		}
 		if (host->data) {
 			host->data->error = -ETIMEDOUT;
 			sdhci_finish_data(host);
-- 
1.7.10.4