[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJx-5qV7qHxk2Uxe@shell.armlinux.org.uk>
Date: Wed, 13 Aug 2025 13:02:46 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
Daniel Braunwarth <daniel.braunwarth@...a.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Jon Hunter <jonathanh@...dia.com>,
netdev@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>,
Thierry Reding <treding@...dia.com>
Subject: Re: [PATCH net-next] net: phy: realtek: fix RTL8211F wake-on-lan
support
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!
Powered by blists - more mailing lists