From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Daniel Braunwarth <daniel.braunwarth@kuka.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Jon Hunter <jonathanh@nvidia.com>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>,
Thierry Reding <treding@nvidia.com>
Subject: Re: [PATCH net-next] net: phy: realtek: fix RTL8211F wake-on-lan support
Date: Wed, 13 Aug 2025 13:02:46 +0100 [thread overview]
Message-ID: <aJx-5qV7qHxk2Uxe@shell.armlinux.org.uk> (raw)
In-Reply-To: <E1um8Ld-008jxD-Mc@rmk-PC.armlinux.org.uk>
On Wed, Aug 13, 2025 at 11:04:45AM +0100, Russell King (Oracle) wrote:
> + /* Mark this PHY as wakeup capable and register the interrupt as a
> + * wakeup IRQ if the PHY is marked as a wakeup source in firmware,
> + * and the interrupt is valid.
> + */
> + if (device_property_read_bool(dev, "wakeup-source") &&
> + phy_interrupt_is_valid(phydev)) {
> + device_set_wakeup_capable(dev, true);
> + devm_pm_set_wake_irq(dev, phydev->irq);
> + }
I'm wondering whether this should just check for the "wakeup-source"
property, which would allow for PMEB mode, and if we don't have a valid
interrupt, we set the INTB/PMEB pin to PMEB mode here. In other words:
if (device_property_read_bool(dev, "wakeup-source")) {
device_set_wakeup_capable(dev, true);
if (phy_interrupt_is_valid(phydev)) {
devm_pm_set_wake_irq(dev, phydev->irq);
} else {
ret = phy_modify_paged(phydev, RTL8211F_INTBCR_PAGE,
RTL8211F_INTBCR,
RTL8211F_INTBCR_INTB_PMEB,
RTL8211F_INTBCR_INTB_PMEB);
}
}
this would support example 3 in the wakeup-source document, where the
PHY is connected to an interrupt-less power management controller.
Any thoughts?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2025-08-13 12:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 10:04 [PATCH net-next] net: phy: realtek: fix RTL8211F wake-on-lan support Russell King (Oracle)
2025-08-13 10:10 ` Russell King (Oracle)
2025-08-13 11:21 ` [PATCH net-next] dt-bindings: net: realtek,rtl82xx: document wakeup-source property Russell King (Oracle)
2025-08-13 16:59 ` Conor Dooley
2025-08-19 0:30 ` patchwork-bot+netdevbpf
2025-08-13 12:02 ` Russell King (Oracle) [this message]
2025-08-15 22:59 ` [PATCH net-next] net: phy: realtek: fix RTL8211F wake-on-lan support Andrew Lunn
2025-08-19 0:30 ` patchwork-bot+netdevbpf
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=aJx-5qV7qHxk2Uxe@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=daniel.braunwarth@kuka.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=treding@nvidia.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 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).