summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Freeman <cfreeman@nvidia.com>2015-10-05 18:09:17 -0700
committerRobert Foss <robert.foss@collabora.com>2016-07-27 15:59:39 -0400
commit59cac681f68f2d7691c99709325b808db84dc189 (patch)
tree160c785705bff9174324e6c3280cd974dc6e497e
parent6bdd0f76ed47e876e3a1b2581dcea2a277fab78a (diff)
downloadlinux-patch_mmc_sdhci_v2.tar.gz
linux-patch_mmc_sdhci_v2.tar.xz
mmc: sdhci: Do not allow tuning procedure to be interruptedpatch_mmc_sdhci_v2
wait_event_interruptible_timeout() will return early if the blocked process receives a signal, causing the driver to abort the tuning procedure and possibly leaving the controller in a bad state. Since the tuning command is expected to complete quickly (<50ms) and we've set a timeout, use wait_event_timeout() instead. Signed-off-by: Christopher Freeman <cfreeman@nvidia.com> Signed-off-by: Robert Foss <robert.foss@collabora.com>
-rw-r--r--drivers/mmc/host/sdhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 0e3d7c0..9e80203 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1960,7 +1960,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
spin_unlock_irqrestore(&host->lock, flags);
/* Wait for Buffer Read Ready interrupt */
- wait_event_interruptible_timeout(host->buf_ready_int,
+ wait_event_timeout(host->buf_ready_int,
(host->tuning_done == 1),
msecs_to_jiffies(50));
spin_lock_irqsave(&host->lock, flags);