From patchwork Thu Nov 7 10:59:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arend van Spriel X-Patchwork-Id: 3152191 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 11EA29F3C4 for ; Thu, 7 Nov 2013 10:59:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE803204D1 for ; Thu, 7 Nov 2013 10:59:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 649302038E for ; Thu, 7 Nov 2013 10:59:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752964Ab3KGK7e (ORCPT ); Thu, 7 Nov 2013 05:59:34 -0500 Received: from mms3.broadcom.com ([216.31.210.19]:4359 "EHLO mms3.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752474Ab3KGK7e (ORCPT ); Thu, 7 Nov 2013 05:59:34 -0500 Received: from [10.9.208.53] by mms3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Thu, 07 Nov 2013 02:58:45 -0800 X-Server-Uuid: B86B6450-0931-4310-942E-F00ED04CA7AF Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.1.438.0; Thu, 7 Nov 2013 02:59:28 -0800 Received: from mail-sj1-12.sj.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.1.438.0; Thu, 7 Nov 2013 02:59:27 -0800 Received: from arend-ubuntu-1 (unknown [10.176.68.27]) by mail-sj1-12.sj.broadcom.com (Postfix) with ESMTP id 560B4207C0; Thu, 7 Nov 2013 02:59:27 -0800 (PST) Received: from arend by arend-ubuntu-1 with local (Exim 4.80) ( envelope-from ) id 1VeNJ5-0000g5-QF; Thu, 07 Nov 2013 11:59:23 +0100 From: "Arend van Spriel" To: "Chris Ball" cc: linux-mmc@vger.kernel.org, "Arend van Spriel" Subject: [PATCH] sdhci: do not program timer when tuning_count is zero Date: Thu, 7 Nov 2013 11:59:19 +0100 Message-ID: <1383821960-2533-1-git-send-email-arend@broadcom.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-WSS-ID: 7E65ADEF1SC5639475-01-01 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 When the host->tuning_count is zero it means that the retuning is disabled. Doing a mod_timer() with a zero tuning_count does something else. Signed-off-by: Arend van Spriel --- drivers/mmc/host/sdhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 7a7fb4f..9803e7a 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2007,7 +2007,8 @@ out: } else { host->flags &= ~SDHCI_NEEDS_RETUNING; /* Reload the new initial value for timer */ - if (host->tuning_mode == SDHCI_TUNING_MODE_1) + if (host->tuning_count && + host->tuning_mode == SDHCI_TUNING_MODE_1) mod_timer(&host->tuning_timer, jiffies + host->tuning_count * HZ); }