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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANhBUQ2qN+vLYiHdUFGH22LnTa3nuKMYncq3JHDJp=vM=ZvCPA@mail.gmail.com>
Date:   Thu, 7 Nov 2019 09:19:25 +0800
From:   Chuhong Yuan <hslester96@...il.com>
To:     Andy Duan <fugang.duan@....com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [EXT] [PATCH] net: fec: add a check for CONFIG_PM to avoid clock
 count mis-match

On Wed, Nov 6, 2019 at 6:17 PM Andy Duan <fugang.duan@....com> wrote:
>
> From: Chuhong Yuan <hslester96@...il.com> Sent: Wednesday, November 6, 2019 4:29 PM
> > On Wed, Nov 6, 2019 at 4:13 PM Andy Duan <fugang.duan@....com> wrote:
> > >
> > > From: Chuhong Yuan <hslester96@...il.com> Sent: Wednesday, November
> > 6,
> > > 2019 4:01 PM
> > > > If CONFIG_PM is enabled, runtime pm will work and call
> > > > runtime_suspend automatically to disable clks.
> > > > Therefore, remove only needs to disable clks when CONFIG_PM is
> > disabled.
> > > > Add this check to avoid clock count mis-match caused by double-disable.
> > > >
> > > > This patch depends on patch
> > > > ("net: fec: add missed clk_disable_unprepare in remove").
> > > >
> > > Please add Fixes tag here.
> > >
> >
> > The previous patch has not been merged to linux, so I do not know which
> > commit ID should be used.
>
> It should be merged into net-next tree.
>

I have searched in net-next but did not find it.

> Andy
> >
> > > Andy
> > > > Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> > > > ---
> > > >  drivers/net/ethernet/freescale/fec_main.c | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/drivers/net/ethernet/freescale/fec_main.c
> > > > b/drivers/net/ethernet/freescale/fec_main.c
> > > > index a9c386b63581..696550f4972f 100644
> > > > --- a/drivers/net/ethernet/freescale/fec_main.c
> > > > +++ b/drivers/net/ethernet/freescale/fec_main.c
> > > > @@ -3645,8 +3645,10 @@ fec_drv_remove(struct platform_device
> > *pdev)
> > > >                 regulator_disable(fep->reg_phy);
> > > >         pm_runtime_put(&pdev->dev);
> > > >         pm_runtime_disable(&pdev->dev);
> > > > +#ifndef CONFIG_PM
> > > >         clk_disable_unprepare(fep->clk_ahb);
> > > >         clk_disable_unprepare(fep->clk_ipg);
> > > > +#endif
> > > >         if (of_phy_is_fixed_link(np))
> > > >                 of_phy_deregister_fixed_link(np);
> > > >         of_node_put(fep->phy_node);
> > > > --
> > > > 2.23.0
> > >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ