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, 8 Aug 2017 12:46:57 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Li Wei <liwei213@...wei.com>
Cc:     Adrian Hunter <adrian.hunter@...el.com>,
        Jaehoon Chung <jh80.chung@...sung.com>,
        Shawn Lin <shawn.lin@...k-chips.com>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Guodong Xu <guodong.xu@...aro.org>
Subject: Re: [PATCH v8 1/2] mmc: dw_mmc: move controller reset before driver init

On 2 August 2017 at 05:17, Li Wei <liwei213@...wei.com> wrote:
> This commit modifies dw_mci_probe(), it moves reset assertion before
> drv_data->init(host)
>
> Some driver needs to access controller registers in its .init() ops. So,
> in order to make such access safe, we should do controller reset before
> .init() being called.
>
> Signed-off-by: Wei Li <liwei213@...wei.com>
> Signed-off-by: Guodong Xu <guodong.xu@...aro.org>
> Signed-off-by: Chen Jun <chenjun14@...wei.com>

This looks good to me. However, I need an ack from Jaehoon to pick this up.

Kind regards
Uffe

> ---
>  drivers/mmc/host/dw_mmc.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index a9dfb26972f2..f2fa928e1a12 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -3067,6 +3067,12 @@ int dw_mci_probe(struct dw_mci *host)
>                 goto err_clk_ciu;
>         }
>
> +       if (!IS_ERR(host->pdata->rstc)) {
> +               reset_control_assert(host->pdata->rstc);
> +               usleep_range(10, 50);
> +               reset_control_deassert(host->pdata->rstc);
> +       }
> +
>         if (drv_data && drv_data->init) {
>                 ret = drv_data->init(host);
>                 if (ret) {
> @@ -3076,12 +3082,6 @@ int dw_mci_probe(struct dw_mci *host)
>                 }
>         }
>
> -       if (!IS_ERR(host->pdata->rstc)) {
> -               reset_control_assert(host->pdata->rstc);
> -               usleep_range(10, 50);
> -               reset_control_deassert(host->pdata->rstc);
> -       }
> -
>         setup_timer(&host->cmd11_timer,
>                     dw_mci_cmd11_timer, (unsigned long)host);
>
> --
> 2.11.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ