netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Rongguang Wei <clementwei90@163.com>
Cc: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com,
	xiaolinkui@kylinos.cn, netdev@vger.kernel.org,
	Rongguang Wei <weirongguang@kylinos.cn>
Subject: Re: [PATCH v1] net: stmmac: add to set device wake up flag when stmmac init phy
Date: Wed, 1 Mar 2023 20:29:17 -0800	[thread overview]
Message-ID: <20230301202917.5960b5e3@kernel.org> (raw)
In-Reply-To: <20230301074756.35156-1-clementwei90@163.com>

On Wed,  1 Mar 2023 15:47:56 +0800 Rongguang Wei wrote:
> From: Rongguang Wei <weirongguang@kylinos.cn>
> 
> When MAC is not support PMT, driver will check PHY's WoL capability
> and set device wakeup capability in stmmac_init_phy(). We can enable
> the WoL through ethtool, the driver would enable the device wake up
> flag. Now the device_may_wakeup() return true.
> 
> But if there is a way which enable the PHY's WoL capability derectly,
> like in BIOS. The driver would not know the enable thing and would not
> set the device wake up flag. The phy_suspend may failed like this:
> 
> [   32.409063] PM: dpm_run_callback(): mdio_bus_phy_suspend+0x0/0x50 returns -16
> [   32.409065] PM: Device stmmac-1:00 failed to suspend: error -16
> [   32.409067] PM: Some devices failed to suspend, or early wake event detected
> 
> Add to set the device wakeup enable flag according to the get_wol
> function result in PHY can fix the error in this scene.

Please add an appropriate Fixes tag and repost if you consider this
a bug fix, or repost next week with [PATCH net-next] for inclusion 
in Linux 6.3 if you're okay with the patch being treated as enabling 
the feature on more platforms (i.e. not a fix).

      reply	other threads:[~2023-03-02  4:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01  7:47 [PATCH v1] net: stmmac: add to set device wake up flag when stmmac init phy Rongguang Wei
2023-03-02  4:29 ` Jakub Kicinski [this message]

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=20230301202917.5960b5e3@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=clementwei90@163.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=weirongguang@kylinos.cn \
    --cc=xiaolinkui@kylinos.cn \
    /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).