From patchwork Thu Aug 15 14:32:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 2845187 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 66F9FBF546 for ; Thu, 15 Aug 2013 14:32:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFD542030D for ; Thu, 15 Aug 2013 14:32:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E561A20386 for ; Thu, 15 Aug 2013 14:32:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758349Ab3HOOca (ORCPT ); Thu, 15 Aug 2013 10:32:30 -0400 Received: from ns.mm-sol.com ([212.124.72.66]:52519 "EHLO extserv.mm-sol.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758208Ab3HOOcN (ORCPT ); Thu, 15 Aug 2013 10:32:13 -0400 Received: from mms.int.mm-sol.com (unknown [172.18.0.3]) by extserv.mm-sol.com (Postfix) with ESMTPSA id D757EC68F; Thu, 15 Aug 2013 17:32:12 +0300 (EEST) From: Georgi Djakov To: cjb@laptop.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Georgi Djakov , Sahitya Tummala Subject: [PATCH 5/5] mmc: sdhci: add quirk to ignore timeout err for R1B Date: Thu, 15 Aug 2013 17:32:20 +0300 Message-Id: <1376577140-2652-6-git-send-email-gdjakov@mm-sol.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1376577140-2652-1-git-send-email-gdjakov@mm-sol.com> References: <1376577140-2652-1-git-send-email-gdjakov@mm-sol.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Georgi Djakov --- 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 */