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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Dec 2016 16:03:46 +0530
From:   Ritesh Harjani <riteshh@...eaurora.org>
To:     Shawn Lin <shawn.lin@...k-chips.com>, ulf.hansson@...aro.org,
        adrian.hunter@...el.com
Cc:     linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
        stummala@...eaurora.org, georgi.djakov@...aro.org,
        linux-arm-msm@...r.kernel.org, pramod.gurav@...aro.org,
        jeremymc@...hat.com, venkatg@...eaurora.org,
        asutoshd@...eaurora.org
Subject: Re: [PATCH 2/4] mmc: mmc: Add change to set controller to HS400
 frequency in enhanced strobe

Hi Shawn,

On 12/20/2016 12:59 PM, Shawn Lin wrote:
> On 2016/12/20 13:53, Ritesh Harjani wrote:
>> Currently mmc_select_hs400es is not setting the desired frequency
>> before sending switch command. This makes CMD13 to timeout on
>> some controllers.
>> Thus add a change to set the desired HS400 frequency
>> in mmc_select_hs400es when the timing is switched to HS400.
>
> What is the desired HS400 freq? I guess it is 200MHz, right?
>
> Well, per the spec, it just say "host *may* changes frequency to
> <= 200Mhz". So before setting timing to MMC_TIMING_MMC_HS400, we
> already reach ext_csd.hs_max_dtr. So it should meet the spec. If
> the fact that some controllers would see CMD13 timeout here, I guess
> you wouldn't let folks add max-frequency to the DT as if the max freq
> is set to just lower than your *desired HS400 freq* , it the same
> failure result even you add this patch, right?
>
> the root cause the controllers see failure for CMD13 is it didn't
> configure the right delay phase or something similar to fit the timing
> under the freq of hs_max_dtr, I guess.
Actually this may be limitation of sdhc msm controller that it cannot 
work at lower frequency while in HS400 mode. I would have to see more on 
this to confirm on why this limitation is there (mostly it was with some 
DLL limitation).
In that case maybe I should not generalize this for other controllers.


But still the below code change to set the bus_speed after setting the 
timing should be fine right ? Since host controller may as well change 
the frequency to 200MHz.

Do you think the below change is fine in this sense? I can change the 
commit message to just -
"set both timing mode and frequency before sending CMD13 in 
mmc_select_hs400es."

Or do you see any other approach to this ?


Regards
Ritesh

>
>>
>> Signed-off-by: Ritesh Harjani <riteshh@...eaurora.org>
>> ---
>>  drivers/mmc/core/mmc.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
>> index b61b52f9..eb69497 100644
>> --- a/drivers/mmc/core/mmc.c
>> +++ b/drivers/mmc/core/mmc.c
>> @@ -1329,6 +1329,7 @@ static int mmc_select_hs400es(struct mmc_card
>> *card)
>>
>>      /* Set host controller to HS400 timing and frequency */
>>      mmc_set_timing(host, MMC_TIMING_MMC_HS400);
>> +    mmc_set_bus_speed(card);
>>
>>      /* Controller enable enhanced strobe function */
>>      host->ios.enhanced_strobe = true;
>>
>
>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ