From: Andy Duan <fugang.duan@nxp.com>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [EXT] [PATCH] net: fec: add a check for CONFIG_PM to avoid clock count mis-match
Date: Wed, 6 Nov 2019 10:17:56 +0000 [thread overview]
Message-ID: <VI1PR0402MB36000BE1C169ECA035BE3610FF790@VI1PR0402MB3600.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CANhBUQ1wZU92K=XTRCNU5HhOzZ761+S83zyjqOdZKpyQVuXrCw@mail.gmail.com>
From: Chuhong Yuan <hslester96@gmail.com> Sent: Wednesday, November 6, 2019 4:29 PM
> On Wed, Nov 6, 2019 at 4:13 PM Andy Duan <fugang.duan@nxp.com> wrote:
> >
> > From: Chuhong Yuan <hslester96@gmail.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.
Andy
>
> > Andy
> > > Signed-off-by: Chuhong Yuan <hslester96@gmail.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
> >
next prev parent reply other threads:[~2019-11-06 10:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 8:01 [PATCH] net: fec: add a check for CONFIG_PM to avoid clock count mis-match Chuhong Yuan
2019-11-06 8:13 ` [EXT] " Andy Duan
2019-11-06 8:29 ` Chuhong Yuan
2019-11-06 10:17 ` Andy Duan [this message]
2019-11-07 1:19 ` Chuhong Yuan
2019-11-07 1:44 ` Andy Duan
2019-11-12 9:15 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=VI1PR0402MB36000BE1C169ECA035BE3610FF790@VI1PR0402MB3600.eurprd04.prod.outlook.com \
--to=fugang.duan@nxp.com \
--cc=davem@davemloft.net \
--cc=hslester96@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).