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: <CAPDyKFqQna5W1eVas84x0wp-gzBSnP7hgofQbSt6nTnZ8t9LYA@mail.gmail.com>
Date:	Mon, 27 Oct 2014 13:12:22 +0100
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Matteo Facchinetti <matteo.facchinetti@...ius-es.it>
Cc:	Chris Ball <chris@...ntf.net>, Alexander Shiyan <shc_work@...l.ru>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Peter Griffin <peter.griffin@...aro.org>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Anatolij Gustschin <agust@...x.de>, gsi@...x.de, sbabic@...x.de
Subject: Re: [PATCH v2 2/2] mmc: mxcmmc: fix the default value for available
 voltages into mxcmci_probe

On 8 October 2014 16:24, Matteo Facchinetti
<matteo.facchinetti@...ius-es.it> wrote:
> From: Matteo Facchinetti <matteo.facchinetti@...ius-es.it>
>
> If available voltages are not given, mmc_regulator_get_supply() function
> returns 0 and mxcmmc driver doesn't set a value for ocr_avail mask.
>
> In accordance with the comment in platform_data/mmc-mxcmmc.h,
> fix it, assuming MMC_VDD_32_33 | MMC_VDD_33_34 as default value.
>
> Signed-off-by: Matteo Facchinetti <matteo.facchinetti@...ius-es.it>

Thanks! Applied for next!

Kind regards
Uffe


> ---
> v2:
> * Add test to check if mmc->ocr_avail is setted by mmc_regulator_get_supply().
>   This will prevent that it be overwritten unconditionally.
> ---
>  drivers/mmc/host/mxcmmc.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index 536a898..5316d9b 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -1077,12 +1077,14 @@ static int mxcmci_probe(struct platform_device *pdev)
>                 dat3_card_detect = true;
>
>         ret = mmc_regulator_get_supply(mmc);
> -       if (ret) {
> -               if (pdata && ret != -EPROBE_DEFER)
> -                       mmc->ocr_avail = pdata->ocr_avail ? :
> -                               MMC_VDD_32_33 | MMC_VDD_33_34;
> +       if (ret == -EPROBE_DEFER)
> +               goto out_free;
> +
> +       if (!mmc->ocr_avail) {
> +               if (pdata && pdata->ocr_avail)
> +                       mmc->ocr_avail = pdata->ocr_avail;
>                 else
> -                       goto out_free;
> +                       mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
>         }
>
>         if (dat3_card_detect)
> --
> 1.8.3.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ