All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sdhci: do not program timer when tuning_count is zero
@ 2013-11-07 10:59 Arend van Spriel
  2013-11-08  6:50 ` Aaron Lu
  2013-11-11  9:49 ` [PATCH V2] sdhci: only reprogram retuning timer when flag is set Arend van Spriel
  0 siblings, 2 replies; 14+ messages in thread
From: Arend van Spriel @ 2013-11-07 10:59 UTC (permalink / raw)
  To: Chris Ball; +Cc: linux-mmc, Arend van Spriel

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 <arend@broadcom.com>
---
 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);
 	}
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-11-13 13:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-07 10:59 [PATCH] sdhci: do not program timer when tuning_count is zero Arend van Spriel
2013-11-08  6:50 ` Aaron Lu
2013-11-08  9:10   ` Arend van Spriel
2013-11-08 11:49     ` Aaron Lu
2013-11-08 11:55       ` Arend van Spriel
2013-11-08 13:19         ` Aaron Lu
2013-11-11  9:49 ` [PATCH V2] sdhci: only reprogram retuning timer when flag is set Arend van Spriel
2013-11-12  6:49   ` Aaron Lu
2013-11-13  5:02   ` Dong Aisheng
2013-11-13 10:21     ` Arend van Spriel
2013-11-13 11:12       ` Dong Aisheng
2013-11-13 11:18         ` Arend van Spriel
2013-11-13 11:25           ` Dong Aisheng
2013-11-13 13:01             ` Aaron Lu

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.