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] [day] [month] [year] [list]
Date:   Mon, 1 Feb 2021 11:52:35 +0100
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Chris Ruehl <chris.ruehl@...ys.com.hk>
Cc:     "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        Ludovic Barre <ludovic.barre@...com>,
        Krishna Konda <kkonda@...eaurora.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Jack <jack.lo@...ys.com.hk>
Subject: Re: [PATCH 6/6] mmc: core: with mmc-hs400-1_8(2)v not add
 MMC_CAP2_HS200* to host->caps2

On Tue, 8 Dec 2020 at 07:19, Chris Ruehl <chris.ruehl@...ys.com.hk> wrote:
>
> When set mmc-hs400-1_8(2)v in dts, hs200 capabilities are not checked
> in the mmc logic. Thus cleanup and remove MMC_CAP2_HS200_1_8V_SDR /
> MMC_CAP2_HS200_1_2V_SDR from host->caps2.

I had another look at this - and I am struggling to get a grip of the
problem you are trying to solve, sorry. Please try to clarify things
through more descriptive commit messages.

*Plain* HS400 mode does seem to require HS200 mode, because tuning
needs to happen in HS200 mode. HS400 mode with enhanced strobe being
supported, doesn't need HS200 to be supported as tuning isn't done in
HS200 mode.

In your case, the controller supports HS400 mode in (1.8V or 1.2V)
with enhanced strobe, but not HS200 mode, correct?

Then because of the code that runs the initialization for the eMMC
card, we end up switching to HS200 mode prior enabling HS400 ES mode,
which causes problems in the driver/controller for your case, correct?

>
> Signed-off-by: Chris Ruehl <chris.ruehl@...ys.com.hk>
> ---
>  drivers/mmc/core/host.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
> index 96b2ca1f1b06..46fde60a2372 100644
> --- a/drivers/mmc/core/host.c
> +++ b/drivers/mmc/core/host.c
> @@ -295,9 +295,9 @@ int mmc_of_parse(struct mmc_host *host)
>         if (device_property_read_bool(dev, "mmc-hs200-1_2v"))
>                 host->caps2 |= MMC_CAP2_HS200_1_2V_SDR;
>         if (device_property_read_bool(dev, "mmc-hs400-1_8v"))
> -               host->caps2 |= MMC_CAP2_HS400_1_8V | MMC_CAP2_HS200_1_8V_SDR;
> +               host->caps2 |= MMC_CAP2_HS400_1_8V;
>         if (device_property_read_bool(dev, "mmc-hs400-1_2v"))
> -               host->caps2 |= MMC_CAP2_HS400_1_2V | MMC_CAP2_HS200_1_2V_SDR;
> +               host->caps2 |= MMC_CAP2_HS400_1_2V;
>         if (device_property_read_bool(dev, "mmc-hs400-enhanced-strobe"))
>                 host->caps2 |= MMC_CAP2_HS400_ES;
>         if (device_property_read_bool(dev, "no-sdio"))
> --
> 2.20.1
>

Kind regards
Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ