All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@amd.com>
To: Chris Ball <cjb@laptop.org>
Cc: linux-mmc@vger.kernel.org, Philip Rakity <prakity@marvell.com>,
	Aaron Lu <aaron.lu@amd.com>,
	stable@kernel.org
Subject: [PATCH 1/2] mmc: sdhci: Fix tuning timer incorrect setting when suspending host
Date: Wed, 28 Dec 2011 11:11:12 +0800	[thread overview]
Message-ID: <1325041873-1320-2-git-send-email-aaron.lu@amd.com> (raw)
In-Reply-To: <1325041873-1320-1-git-send-email-aaron.lu@amd.com>

When suspending host, the tuning timer shoule be deactivated.
And the HOST_NEEDS_TUNING flag should be set after tuning timer is
deactivated.

Signed-off-by: Philip Rakity <prakity@marvell.com>
Signed-off-by: Aaron Lu <aaron.lu@amd.com>
Cc: stable@kernel.org
---
 drivers/mmc/host/sdhci.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index ab6018f..2007d37 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2346,9 +2346,8 @@ int sdhci_suspend_host(struct sdhci_host *host)
 	/* Disable tuning since we are suspending */
 	if (host->version >= SDHCI_SPEC_300 && host->tuning_count &&
 	    host->tuning_mode == SDHCI_TUNING_MODE_1) {
+		del_timer_sync(&host->tuning_timer);
 		host->flags &= ~SDHCI_NEEDS_RETUNING;
-		mod_timer(&host->tuning_timer, jiffies +
-			host->tuning_count * HZ);
 	}
 
 	ret = mmc_suspend_host(host->mmc);
-- 
1.7.7.4



  reply	other threads:[~2011-12-28  3:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28  3:11 [PATCH 0/2] mmc: sdhci: Fix for sdhci suspend function Aaron Lu
2011-12-28  3:11 ` Aaron Lu [this message]
2011-12-28 12:24   ` [PATCH 1/2] mmc: sdhci: Fix tuning timer incorrect setting when suspending host Adrian Hunter
2011-12-28  3:11 ` [PATCH 2/2] mmc: sdhci: Deal with failure case in sdhci_suspend_host Aaron Lu
2011-12-28 12:23   ` Adrian Hunter
2011-12-29  2:32     ` Aaron Lu

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=1325041873-1320-2-git-send-email-aaron.lu@amd.com \
    --to=aaron.lu@amd.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=prakity@marvell.com \
    --cc=stable@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.