From patchwork Thu May 12 08:18:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 779362 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4C8IvZq006688 for ; Thu, 12 May 2011 08:18:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751517Ab1ELIS4 (ORCPT ); Thu, 12 May 2011 04:18:56 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:48546 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475Ab1ELISz (ORCPT ); Thu, 12 May 2011 04:18:55 -0400 Received: from epcpsbgm2.samsung.com (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LL2002ISPRFOBS0@mailout3.samsung.com> for linux-mmc@vger.kernel.org; Thu, 12 May 2011 17:18:51 +0900 (KST) X-AuditID: cbfee61b-b7bb4ae000002c54-82-4dcb97ebc3fd Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id 02.8D.11348.BE79BCD4; Thu, 12 May 2011 17:18:51 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LL2005JHPRFNG@mmp2.samsung.com> for linux-mmc@vger.kernel.org; Thu, 12 May 2011 17:18:51 +0900 (KST) Received: from [165.213.219.108] ([165.213.219.108]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.4675); Thu, 12 May 2011 17:18:51 +0900 Date: Thu, 12 May 2011 17:18:59 +0900 From: Jaehoon Chung Subject: [PATCH] mmc: duplicated trial with same freq when mmc_rescan_try_freq() To: "linux-mmc@vger.kernel.org" Cc: Chris Ball , Kyungmin Park , andy.ross@windriver.com Message-id: <4DCB97F3.9060704@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT User-Agent: Thunderbird 2.0.0.24 (X11/20100623) X-OriginalArrivalTime: 12 May 2011 08:18:51.0044 (UTC) FILETIME=[399CDE40:01CC107D] X-Brightmail-Tracker: AAAAAA== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 12 May 2011 08:18:58 +0000 (UTC) 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 Signed-off-by: Kyungmin Park --- drivers/mmc/core/core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);