Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9642388a4c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9642388a4c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
9642388 to
6e93405
Compare
6e93405 to
3fbc3f0
Compare
Description
The RTL8211F on ODROID-HC4 has its interrupt wired to GPIOZ_14 and the device
tree already describes it, but the node does not declare that it can wake the
board. The Realtek PHY driver registers the interrupt as a wakeup IRQ only for
nodes that say so:
Without the property Wake-on-LAN looks enabled and does nothing:
ethtool -s end0 wol gsucceeds, the PHY stores the magic packet and raises PME on itsinterrupt line, but that interrupt is not a wakeup source, so it is masked
entering suspend and the board sleeps through the packet.
Added to meson64-6.18, -7.2 and -7.3. Not to 6.12: that kernel's Realtek driver
has no
wakeup-sourcehandling at all — nodevm_pm_set_wake_irq()call — sothe property would sit in the device tree doing nothing.
Dependencies — please do not merge before these
This patch is inert on its own, and worse than inert if merged alone: userspace
will report Wake-on-LAN as enabled while the board still cannot be woken.
IRQCHIP_SKIP_SET_WAKEfor the Amlogic GPIOinterrupt controller. The PHY interrupt arrives through
meson_gpio_irq_chip; without the flagenable_irq_wake()fails with-ENXIO and the interrupt is masked entering suspend. Required.
pci-meson.c(draft).Not required for the wake itself, but on HC4 the SATA controller sits
behind PCIe: without it the board wakes up into a hung PCIe controller,
which on a NAS is worse than not waking at all.
How Has This Been Tested?
Tested on ODROID-HC4, kernel 7.2.6, with both prerequisites applied.
broadcast address and to the subnet broadcast; only the RTC alarm brings
it back (
pm_wakeup_irqreports the RTC interrupt), and the networkdevice reports
wakeup_count 0. The PHY has nopower/wakeupin sysfsat all.
power/wakeup,ethtool -s end0 wol ggives
Wake-on: g, the PHY moves towakeup=enabledby itself, and thesame magic packet wakes the board within seconds.
this patch.
Checklist: