RE: [PATCH] mmc: duplicated trial with same freq when mmc_rescan_try_freq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The required min frequency (f_min) is 400KHz during identify stage, is it necessary to use the  frequency table (freqs[], including 300KHz, 200KHz and 100KHz)?

Thanks and Best Regards
Jerry Huang


> -----Original Message-----
> From: linux-mmc-owner@xxxxxxxxxxxxxxx [mailto:linux-mmc-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Jaehoon Chung
> Sent: Thursday, May 12, 2011 4:19 PM
> To: linux-mmc@xxxxxxxxxxxxxxx
> Cc: Chris Ball; Kyungmin Park; andy.ross@xxxxxxxxxxxxx
> Subject: [PATCH] mmc: duplicated trial with same freq when
> mmc_rescan_try_freq()
> 
> 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@xxxxxxxxxxx>
> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
> ---
>  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);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at
> http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux