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, 16 Jul 2018 11:43:37 +0000
From:   Fang Hongjie(方洪杰) 
        <hongjiefang@...micro.com>
To:     Ulf Hansson <ulf.hansson@...aro.org>
CC:     Shawn Lin <shawn.lin@...k-chips.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        "Wolfram Sang" <wsa+renesas@...g-engineering.com>,
        Bastian Stender <bst@...gutronix.de>,
        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 V3] mmc: core: improve reasonableness of bus width
 setting for HS400es


> On 16 July 2018 at 13:11, 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..b2e1eb6 100644
> > --- a/drivers/mmc/core/mmc.c
> > +++ b/drivers/mmc/core/mmc.c
> > @@ -1338,8 +1338,11 @@ static int mmc_select_hs400es(struct mmc_card *card)
> >                 goto out_err;
> >
> >         err = mmc_select_bus_width(card);
> > -       if (err < 0)
> > +       if (err != MMC_BUS_WIDTH_8) {
> > +               pr_err("%s: switch to 8bit bus width failed, err:%d\n",
> > +                       mmc_hostname(host), err);
> >                 goto out_err;
> 
> You need to set err to a proper error code, else you may return a
> non-error code from the out_err label.

How about using the EIO or ENOTSUPP?

> 
> [...]
> 
> Kind regards
> Uffe

B&R
Hongjie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ