lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 25 Apr 2013 10:18:57 +0200
From:	<maxin.john@...a.com>
To:	<cjb@...top.org>
CC:	<linux-mmc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<maxin.john@...il.com>, "Maxin B. John" <maxin.john@...a.com>
Subject: [PATCH] mmc: host: sdhci: Fix console flooding when there is no proper card detection

From: "Maxin B. John" <maxin.john@...a.com>

With 3.9.0-rc8 kernel in p2020rdb powerpc target, the console gets
flooded with this message without any SD-Cards present:
"mmc0: Timeout waiting for hardware interrupt"

Since the driver doesn't implement proper card detection, it assumes that
card is always present. This quick-n-dirty patch removes this console
flooding.

In an ideal world, the driver should have "cd-gpio" support.

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

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 51bbba4..3347864 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2131,10 +2131,18 @@ static void sdhci_timeout_timer(unsigned long data)
 	spin_lock_irqsave(&host->lock, flags);
 
 	if (host->mrq) {
+		/*
+		 * 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)
+			goto data_check;
+
 		pr_err("%s: Timeout waiting for hardware "
 			"interrupt.\n", mmc_hostname(host->mmc));
 		sdhci_dumpregs(host);
 
+data_check:
 		if (host->data) {
 			host->data->error = -ETIMEDOUT;
 			sdhci_finish_data(host);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ