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]
Message-ID: <CAPDyKFpv_zedwgDRmHTUadaDYb-xBQLFRV0sAk116YbjOhY+GA@mail.gmail.com>
Date:   Mon, 16 Jul 2018 12:11:54 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Hongjie Fang <hongjiefang@...micro.com>
Cc:     Adrian Hunter <adrian.hunter@...el.com>,
        Shawn Lin <shawn.lin@...k-chips.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Bastian Stender <bst@...gutronix.de>,
        Jin Qian <jinqian@...gle.com>, Chanho Min <chanho.min@....com>,
        Kyle Roeschley <kyle.roeschley@...com>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2] mmc: core: improve reasonableness of bus width setting
 for HS400es

On 11 July 2018 at 05:00, Hongjie Fang <hongjiefang@...micro.com> wrote:
> mmc_select_hs400es() calls mmc_select_bus_width() which will continue
> to set 4bit transfer mode if fail to set 8bit mode. The bus width
> should not be set to 4bit in HS400es.
>
> When fail to set 8bit mode, need return error directly for HS400es.
>
> Signed-off-by: Hongjie Fang <hongjiefang@...micro.com>
> ---
>  drivers/mmc/core/mmc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 4466f5d..4bd6c09 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1021,8 +1021,11 @@ static int mmc_select_bus_width(struct mmc_card *card)
>                                  EXT_CSD_BUS_WIDTH,
>                                  ext_csd_bits[idx],
>                                  card->ext_csd.generic_cmd6_time);
> -               if (err)
> +               if (err) {
> +                       if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400ES)
> +                               return err;
>                         continue;
> +               }

I would rather let mmc_select_hs400es() check the return code from
mmc_select_bus_width().

So, if the return code isn't MMC_BUS_WIDTH_8, mmc_select_hs400es()
should bail out.

[...]

Kind regards
Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ