Repository navigation
wifi: apple: centauri: Quiesce Alpha for sleep on every N1 board - #2385
Conversation
The Alpha host-power and ACIPC sleep requests are the N1 firmware's protocol, but suspend and resume only ran them on apple,j813. J815 has the same N1 behind the same PCI functions and its own entry in the driver's board table. Run suspend wherever the native driver bound (c->wifi is set, which needs a board entry), still behind the TEST ONLY alpha_sleep_untested switch, and drop resume's board check: it only undoes requests suspend sent and returns at once otherwise. With the switch off nothing changes on any board. Fixes: 4cca392 ("wifi: apple: centauri: quiesce Alpha for J813 system sleep") Suggested-by: Thomas Glanzmann <[email protected]> Signed-off-by: Ryan Murray <[email protected]>
|
J813 (MacBook Air 13" M5), macOS 27.2 stub, Two deep cycles with a 30 s alarm: each one logged the full handshake, and there was no After each wake, the interface kept its addresses and pinged the gateway (3/3), and Bluetooth stayed powered. s2idle: not run. 🤖 Generated with Claude Code |
|
A J813 data point for this series. #2385 does not cause it, but it shows how the handshake it widens can fail. Default J813 boot (integration/aurora with #2135 and #2142,
So one failed handshake costs Wi-Fi until reboot, not just that one sleep. This doesn't block #2385, which stays behind the TEST-ONLY switch. But a J815 or J873g row that passes two cycles does not rule this out; a wake followed by an immediate second suspend (lid closed, cable change) is the case that hit it here. The fix belongs in the driver: recover an Alpha at exec 3, or at least clear the pause so it can be restarted. That is separate from this PR. |
|
J873g: I can't run this row yet. The J873g's kernel configs (the integration-based PR stack and the private desktop one) build without So there's no T8152-specific sequence to key on yet. Today's J873g kernel binds the same N1 functions as the J813: Wi-Fi reaches |
|
|
J813 (MacBook Air 13" M5), macOS 27.2 stub, s2idle with The full handshake both ways, no paused transport: Wi-Fi re-associated about 3.4 s after With the deep rows above, that completes the J813 row. 🤖 Generated with Claude Code |
|
The J813 rows are complete (two deep cycles and one s2idle cycle with the full handshake). The handshake still runs only behind the test-only alpha_sleep_untested module parameter; for this to be production-ready it should run by default where the device tree describes the Alpha sleep path, with the parameter removed. Then a J815 row on the default command line (one s2idle and one deep cycle with no "Alpha transport remains paused", Wi-Fi scanning after resume), a review and ready-marking. |
|
J815 (MacBook Air 15" M5) row at Candidate: One timed deep sleep and wake ( Regression on the same boot ( |
|
J815 (MacBook Air 15" M5) row at Candidate: One deep sleep with no timer, woken by a key on the built-in keyboard after about 10 minutes (boot Regression on the same boot, after the wake: 0 SELinux denials (SELinux off), 0 failed units, 0 new kernel errors vs the previous boot, 0 WARN/BUG/Oops. |
Alpha's host-power and ACIPC sleep handshake ran only with apple_centauri.alpha_sleep_untested=1. Without it the N1 firmware is not told the host goes to sleep, and a deep sleep is aborted and the Mac woken about a minute in. The handshake runs through full deep sleeps and wakes on J813 and J815 (MacBook Air 13" and 15" M5). Default it on, for a deep sleep only: across s2idle the firmware keeps running and nothing is sent, as before. alpha_sleep_untested=0 skips it. Signed-off-by: Nick <[email protected]>
…fault wifi: apple: centauri: Send the Alpha sleep handshake by default
There was a problem hiding this comment.
Verdict: MERGE at e65cbcb
Drops the J813 machine gate and makes the Alpha sleep handshake the default for firmware (deep) sleep; s2idle is untouched (pm_suspend_via_firmware() is false there). Better than before: without the handshake the N1 firmware aborts deep sleep about a minute in.
Checked: centauri_wifi_resume() without the board gate is a no-op unless suspend sent a request (alpha_resume_locked() returns early when neither *_sleep_sent flag is set), so s2idle and boards that never sent it are unaffected. Suspend still refuses with -EBUSY while Wi-Fi is associated; NetworkManager disconnects before device suspend (the J815 row slept connected-at-request), and a refused deep sleep is no worse than today's aborted one. Rows: J815 PASS at f63bd68 (handshake + 185 s sleep + reconnect) and at b1c3392. J813 row still open (owner).
Blockers: none. Follow-up from B1-GATES removes the alpha_sleep_untested parameter itself.
Problem
centauri_wifi_suspend()andcentauri_wifi_resume()(drivers/net/wireless/apple/centauri/centauri_wifi.c:2713,2726) only run onapple,j813. The host-power and ACIPC sleep requests they send are the N1 firmware's protocol. J815 has the same N1 behind the same PCI functions and its own entry in the driver's board table (4cca392, "wifi: apple: centauri: quiesce Alpha for J813 system sleep").Change
c->wifiset, which needs acentauri_board()entry). It stays behind the existing TEST-ONLYapple_centauri.alpha_sleep_untestedswitch.alpha_resume_locked()returns at once when none were sent).Testing
centauri_wifi.cbefore and after with the release config's kbuild command line and W=1, as a module: no compiler warnings on either side.Still to run
apple_centauri.alpha_sleep_untested=1, Wi-Fi disconnected, one s2idle and one deep cycle. Expected: no "Alpha transport remains paused" error, Wi-Fi scans after resume.Details
btcentauri.c(Bluetooth side, the same pattern) is handled in a separate change.