Commit 5b39b6d1 authored by Aaron Lu's avatar Aaron Lu Committed by Greg Kroah-Hartman

mmc: sdhci: Fix tuning timer incorrect setting when suspending host

commit c6ced0db 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: default avatarPhilip Rakity <prakity@marvell.com>
Signed-off-by: default avatarAaron Lu <aaron.lu@amd.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4ed074c6
......@@ -2336,9 +2336,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment