aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@amd.com>2011-12-27 22:11:12 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-25 20:24:46 -0500
commit62a0e438f7275e845bfbcccd6e641e07d4b89182 (patch)
tree2270fbdb8bf9b1ef0d37f1fe676e25fc998b4071
parent1cfbbb9ba574157c9f2312d3267762fdde0bfc59 (diff)
mmc: sdhci: Fix tuning timer incorrect setting when suspending host
commit c6ced0db08010ed75df221a2946c5228454b38d5 upstream. 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> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/mmc/host/sdhci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 6d3de0888e7..9bd62faac0a 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2227,9 +2227,8 @@ int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state)
2227 /* Disable tuning since we are suspending */ 2227 /* Disable tuning since we are suspending */
2228 if (host->version >= SDHCI_SPEC_300 && host->tuning_count && 2228 if (host->version >= SDHCI_SPEC_300 && host->tuning_count &&
2229 host->tuning_mode == SDHCI_TUNING_MODE_1) { 2229 host->tuning_mode == SDHCI_TUNING_MODE_1) {
2230 del_timer_sync(&host->tuning_timer);
2230 host->flags &= ~SDHCI_NEEDS_RETUNING; 2231 host->flags &= ~SDHCI_NEEDS_RETUNING;
2231 mod_timer(&host->tuning_timer, jiffies +
2232 host->tuning_count * HZ);
2233 } 2232 }
2234 2233
2235 ret = mmc_suspend_host(host->mmc); 2234 ret = mmc_suspend_host(host->mmc);