From: Andrew Lunn <andrew@lunn.ch>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: netdev@vger.kernel.org, Clark Wang <xiaoning.wang@nxp.com>,
Eric Dumazet <edumazet@google.com>,
Shenwei Wang <shenwei.wang@nxp.com>, Wei Fang <wei.fang@nxp.com>,
NXP Linux Team <linux-imx@nxp.com>,
kernel@pengutronix.de, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next 2/9] net: fec: Don't return early on error in .remove()
Date: Tue, 14 Mar 2023 01:30:35 +0100 [thread overview]
Message-ID: <d16568e8-9ec8-4c4b-bbee-9d585c772c4b@lunn.ch> (raw)
In-Reply-To: <20230313162141.vkhyz77u44wxq4vn@pengutronix.de>
> > > - ret = pm_runtime_resume_and_get(&pdev->dev);
> > > - if (ret < 0)
> > > - return ret;
> > regulator_disable() probably does actually work because that is a
> > different hardware block unaffected by the suspend.
> fec_suspend() calls
>
> if (fep->reg_phy && !(fep->wol_flag & FEC_WOL_FLAG_ENABLE))
> regulator_disable(fep->reg_phy);
There are two different types of suspend here.
pm_runtime_resume_and_get() is about runtime suspend. It calls
fec_runtime_suspend() which just turns some clocks off/on.
fec_suspend() is for system sleep, where the whole system is put to
sleep, except what is needed to trigger a wake up, such as Wake on
LAN. The regulator is being used to power the PHY, so you obviously
don't want to turn the PHY off when doing WoL.
But if you are unloading the FEC, WoL is not going to work, so you
should turn the PHY off. And turning the PHY off should not have any
dependencies on first turning on FEC clocks in
pm_runtime_resume_and_get().
Andrew
next prev parent reply other threads:[~2023-03-14 0:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 10:36 [PATCH net-next 0/9] net: freescale: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-13 10:36 ` Uwe Kleine-König
2023-03-13 10:36 ` [PATCH net-next 1/9] net: dpaa: Improve error reporting Uwe Kleine-König
2023-03-13 11:12 ` Madalin Bucur
2023-03-13 10:36 ` [PATCH net-next 2/9] net: fec: Don't return early on error in .remove() Uwe Kleine-König
2023-03-13 15:07 ` Andrew Lunn
2023-03-13 16:21 ` Uwe Kleine-König
2023-03-14 0:30 ` Andrew Lunn [this message]
2023-03-14 22:13 ` Uwe Kleine-König
2023-03-13 10:36 ` [PATCH net-next 3/9] net: dpaa: Convert to platform remove callback returning void Uwe Kleine-König
2023-03-13 10:36 ` [PATCH net-next 4/9] net: fec: " Uwe Kleine-König
2023-03-14 22:15 ` Uwe Kleine-König
2023-03-15 5:28 ` Jakub Kicinski
2023-03-15 6:29 ` Uwe Kleine-König
2023-03-13 10:36 ` [PATCH net-next 5/9] net: fman: " Uwe Kleine-König
2023-03-13 10:36 ` [PATCH net-next 6/9] net: fs_enet: " Uwe Kleine-König
2023-03-13 10:36 ` Uwe Kleine-König
2023-03-13 10:36 ` [PATCH net-next 7/9] net: fsl_pq_mdio: " Uwe Kleine-König
2023-03-13 10:36 ` [PATCH net-next 8/9] net: gianfar: " Uwe Kleine-König
2023-03-13 10:36 ` [PATCH net-next 9/9] net: ucc_geth: " Uwe Kleine-König
2023-03-13 11:15 ` [PATCH net-next 0/9] net: freescale: " Madalin Bucur
2023-03-13 11:15 ` Madalin Bucur
2023-03-13 15:05 ` Michal Kubiak
2023-03-13 15:05 ` Michal Kubiak
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=d16568e8-9ec8-4c4b-bbee-9d585c772c4b@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-imx@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shenwei.wang@nxp.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.