lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e98b85ce-c382-09ca-a819-ab7c581158e4@intel.com>
Date:   Tue, 11 Oct 2022 11:48:07 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Wenchao Chen <wenchao.chen666@...il.com>
Cc:     ulf.hansson@...aro.org, orsonzhai@...il.com,
        baolin.wang@...ux.alibaba.com, zhang.lyra@...il.com,
        linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
        megoo.tang@...il.com, lzx.stg@...il.com
Subject: Re: [PATCH] mmc: sdhci-sprd: Fix minimum clock limit

On 11/10/22 11:40, Wenchao Chen wrote:
> On Tue, Oct 11, 2022 at 2:45 PM Adrian Hunter <adrian.hunter@...el.com> wrote:
>>
>> On 11/10/22 09:30, Wenchao Chen wrote:
>>> From: Wenchao Chen <wenchao.chen@...soc.com>
>>>
>>> The minimum clock supported by SPRD Host is 100000.
>>
>> Commit messages are better if they say why a change
>> is being made.
>>
>> This begs the question, was there a problem with 400 kHz?
>> Are there cases that benefit from this change?
>> Should it have a fixes tag,cc stable?
>>
> 
> Code show as below:
> static struct sdhci_ops sdhci_sprd_ops = {
> ...
> .get_min_clock = sdhci_sprd_get_min_clock,
> ...
> };
> 
> int sdhci_setup_host(struct sdhci_host *host)
> {
> ...
> if (host->ops->get_min_clock)
> mmc->f_min = host->ops->get_min_clock(host);
> ...
> }
> 
> static const unsigned freqs[] = { 400000, 300000, 200000, 100000 };
> void mmc_rescan(struct work_struct *work)
> {
> ...
> for (i = 0; i < ARRAY_SIZE(freqs); i++) {
> unsigned int freq = freqs[i];
> if (freq > host->f_max) {
> if (i + 1 < ARRAY_SIZE(freqs))
> continue;
> freq = host->f_max;
> }
> if (!mmc_rescan_try_freq(host, max(freq, host->f_min)))
> break;
> if (freqs[i] <= host->f_min) // If you start at 100K, you will try
> 400K, 300K, 200K, 100K.
> break;
> }
> ...
> }
> 
> Our controller supports 100K. During the test, it was found that mmc_rescan
> failed to scan the card at 400K, and did not try 300K, 200K, and 100K. After
> modifying the minimum clock limit to 100K, the card scan was successful.

Please add those last 3 lines to the commit message, then you can add:

Acked-by: Adrian Hunter <adrian.hunter@...el.com>

Also please consider adding a Fixes: tag.

> 
>>>
>>> Signed-off-by: Wenchao Chen <wenchao.chen@...soc.com>
>>> ---
>>>  drivers/mmc/host/sdhci-sprd.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
>>> index 46c55ab4884c..b92a408f138d 100644
>>> --- a/drivers/mmc/host/sdhci-sprd.c
>>> +++ b/drivers/mmc/host/sdhci-sprd.c
>>> @@ -309,7 +309,7 @@ static unsigned int sdhci_sprd_get_max_clock(struct sdhci_host *host)
>>>
>>>  static unsigned int sdhci_sprd_get_min_clock(struct sdhci_host *host)
>>>  {
>>> -     return 400000;
>>> +     return 100000;
>>>  }
>>>
>>>  static void sdhci_sprd_set_uhs_signaling(struct sdhci_host *host,
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ