public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: duplicated trial with same freq when mmc_rescan_try_freq()
@ 2011-05-12  8:18 Jaehoon Chung
  2011-05-12  8:57 ` Huang Changming-R66093
  2011-05-13 16:48 ` Chris Ball
  0 siblings, 2 replies; 7+ messages in thread
From: Jaehoon Chung @ 2011-05-12  8:18 UTC (permalink / raw)
  To: linux-mmc@vger.kernel.org; +Cc: Chris Ball, Kyungmin Park, andy.ross

when running mmc_rescan_try_freq(), try to init two times with last frequency.
For example, assume that host->f_min is 400KHz, we can find the below message.

mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz

i didn't find to mention about this..why try to init the two times with same frequency?
Is there any reason? If i missed the history, plz let me know them.

I think that trial is not necessary. Trial needs to running with other frequency.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/mmc/core/core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 61c6c0b..a330c58 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1618,7 +1618,7 @@ void mmc_rescan(struct work_struct *work)
 	for (i = 0; i < ARRAY_SIZE(freqs); i++) {
 		if (!mmc_rescan_try_freq(host, max(freqs[i], host->f_min)))
 			break;
-		if (freqs[i] < host->f_min)
+		if (freqs[i] <= host->f_min)
 			break;
 	}
 	mmc_release_host(host);

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

end of thread, other threads:[~2011-05-13 16:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-12  8:18 [PATCH] mmc: duplicated trial with same freq when mmc_rescan_try_freq() Jaehoon Chung
2011-05-12  8:57 ` Huang Changming-R66093
2011-05-12 11:18   ` Jaehoon Chung
2011-05-12 14:04   ` Chris Ball
2011-05-13  2:16     ` Jaehoon Chung
2011-05-13 16:18       ` Andy Ross
2011-05-13 16:48 ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox