mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Georgi Djakov <gdjakov@mm-sol.com>
To: cjb@laptop.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Georgi Djakov <gdjakov@mm-sol.com>,
	Sahitya Tummala <stummala@codeaurora.org>
Subject: [PATCH 5/5] mmc: sdhci: add quirk to ignore timeout err for R1B
Date: Thu, 15 Aug 2013 17:32:20 +0300	[thread overview]
Message-ID: <1376577140-2652-6-git-send-email-gdjakov@mm-sol.com> (raw)
In-Reply-To: <1376577140-2652-1-git-send-email-gdjakov@mm-sol.com>

This patch adds a quirk to ignore data timeout error for R1B commands
as there will be no data associated and the busy timeout value for these
commands could be larger than the maximum timeout value that controller
can handle.

CC: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Georgi Djakov <gdjakov@mm-sol.com>
---
 drivers/mmc/host/sdhci.c  |    3 +++
 include/linux/mmc/sdhci.h |    4 ++++
 2 files changed, 7 insertions(+)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index e21bb6f..f120b14 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2353,6 +2353,9 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
 			}
 		}
 
+		if (host->quirks2 & SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD)
+			return;
+
 		pr_err("%s: Got data interrupt 0x%08x even "
 			"though no data operation was in progress.\n",
 			mmc_hostname(host->mmc), (unsigned)intmask);
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index f42f6dd..ad65fb8 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -108,6 +108,10 @@ struct sdhci_host {
  * the mmc queue. Otherwise, it takes a long time for secure discard kind of
  * operations to complete. */
 #define SDHCI_QUIRK2_USE_MAX_DISCARD_SIZE		(1<<9)
+/* Ignore data timeout error for R1B commands as there will be no data
+ * associated and the busy timeout value for these commands could be larger
+ * than the maximum timeout value that controller can handle. */
+#define SDHCI_QUIRK2_IGNORE_DATATOUT_FOR_R1BCMD	(1<<10)
 
 	int irq;		/* Device IRQ */
 	void __iomem *ioaddr;	/* Mapped address */
-- 
1.7.9.5


      parent reply	other threads:[~2013-08-15 14:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 14:32 [PATCH 0/5] mmc: sdhci: Add quirks for Qualcomm MSM SDHCI controller Georgi Djakov
2013-08-15 14:32 ` [PATCH 1/5] mmc: sdhci: add quirk for R/W Transfer Active EOT Georgi Djakov
2013-08-15 14:32 ` [PATCH 2/5] mmc: sdhci: add quirk for slow interrupt clearance Georgi Djakov
2013-08-15 14:32 ` [PATCH 3/5] mmc: sdhci: add quirk to ignore CMD CRC err for tuning commands Georgi Djakov
2013-08-15 14:32 ` [PATCH 4/5] mmc: sdhci: add quirk for max_discard calculation Georgi Djakov
2013-08-15 14:32 ` Georgi Djakov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1376577140-2652-6-git-send-email-gdjakov@mm-sol.com \
    --to=gdjakov@mm-sol.com \
    --cc=cjb@laptop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=stummala@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®