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  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, 22 Jan 2019 14:41:29 -0800
From:   Evan Green <evgreen@...omium.org>
To:     Stephen Boyd <swboyd@...omium.org>
Cc:     Andy Gross <andy.gross@...aro.org>,
        Kishon Vijay Abraham I <kishon@...com>,
        Rob Herring <robh+dt@...nel.org>,
        Can Guo <cang@...eaurora.org>,
        Douglas Anderson <dianders@...omium.org>,
        Asutosh Das <asutoshd@...eaurora.org>,
        Vivek Gautam <vivek.gautam@...eaurora.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Manu Gautam <mgautam@...eaurora.org>
Subject: Re: [PATCH v1 6/8] phy: qcom-qmp: Utilize UFS reset controller

On Fri, Jan 18, 2019 at 2:33 PM Stephen Boyd <swboyd@...omium.org> wrote:
>
> Quoting Evan Green (2019-01-11 15:01:27)
> > @@ -1214,6 +1225,32 @@ static int qcom_qmp_phy_init(struct phy *phy)
> >
> >         dev_vdbg(qmp->dev, "Initializing QMP phy\n");
> >
> > +       if (cfg->has_ufsphy_reset) {
> > +               /*
> > +                * Get UFS reset, which is delayed until now to avoid a
> > +                * circular dependency where UFS needs its PHY, but the PHY
> > +                * needs this UFS reset.
> > +                */
> > +               if (!qmp->ufs_reset) {
> > +                       qmp->ufs_reset = of_reset_control_get(qmp->dev->of_node,
>
> Can you use devm_reset_control_get()? Put another way, why is this DT
> specific instead of using a firmware/platform agnostic API?

Sure, will fix. (Though sadly of_* is peppered all over the place in
this file for lane resets, pipe clocks, and more).

>
> > +                                                             "ufsphy");
> > +
> > +                       if (IS_ERR(qmp->ufs_reset)) {
> > +                               dev_err(qmp->dev,
> > +                                       "failed to get UFS reset: %d\n",
> > +                                       PTR_ERR(qmp->ufs_reset));
> > +
> > +                               return PTR_ERR(qmp->ufs_reset);
> > +                       }
> > +               }
> > +
> > +               ret = reset_control_assert(qmp->ufs_reset);
> > +               if (ret) {
> > +                       dev_err(qmp->dev, "ufsphy reset deassert failed\n");
>
> It's an assert though. Maybe just ignore the error message because the
> user won't be able to do anything anyway?
>

Fair enough. I'll remove the print from here and the deassert later.
-Evan

Powered by blists - more mailing lists