Repository navigation
wifi: apple: centauri: t6050: gate commands during host sleep - #3110
Merged
Merged
Conversation
A cfg80211 regulatory callback can run after the Alpha host-sleep command and poll the BAR while PCI is entering D3hot. Reject firmware commands before touching the rings or BAR while host sleep is active. Keep the latest named country while asleep and refresh the channel flags once the Alpha wake succeeds. Use the same replay on suspend unwind and keep the gate closed if the wake fails. Let the existing resume recovery handle transport loss during replay. Fixes: b8fce26 ("wifi: apple: centauri: t6050: keep N1 firmware and Wi-Fi alive across deep sleep") Signed-off-by: Diljit Singh <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
satchlj
approved these changes
Nov 25, 2026
satchlj
left a comment
Member
There was a problem hiding this comment.
Gemini 4 Neon on @satchlj's behalf
Verdict at 588178f04769
APPROVE — Clean, well-tested fix gating N1 Alpha commands while the host is asleep (-EHOSTDOWN before sequence increment, descriptor publish, or BAR access), preserving deferred regulatory/country state across wake and suspend unwind under consistent rtnl_lock -> wifi->lock ordering, with all latest CI checks green.
Blockers
None.
Checked
- Diff scope: 2 files changed (
drivers/net/wireless/apple/centauri/t6050/centauri_wifi.c,tools/asahi/centauri-wifi-pm-tests.py,+167/-18), 1 commit (588178f04769) carryingSigned-off-by: Diljit Singh <[email protected]>. - Code & locking audit:
command_reply()returns-EHOSTDOWNwhenwifi->host_sleep_sentis set right after clearing*submitted = false, before incrementingwifi->sequenceor touching ring indices/BAR MMIO.- Confirmed
alpha_transport_state()uses direct BAR MMIO (bar + 0x1024) rather thancommand_reply(), so settingwifi->host_sleep_sent = truebeforealpha_transport_state(wifi, true)does not block the transport-sleep handshake. - Confirmed
alpha_resume_locked()clearswifi->host_sleep_sentunderwifi->lockforalpha_host_power(wifi, false)and restoreswifi->host_sleep_sent = trueon failure without dropping deferred regulatory state; on success, replayscountry_set()+channels_apply()and returns-EIOwithout unpausing TX/transport ifwifi->command_failedlatches. - Verified lock ordering (
rtnl_lock -> wifi->lock) acrosswifi_regulatory(),centauri_t6050_wifi_suspend(),centauri_t6050_wifi_resume(),alpha_resume_locked()(ASSERT_RTNL()+lockdep_assert_held(&wifi->lock)), andcentauri_pci.ccallers (SYSTEM_SLEEP_PM_OPS.suspend/.resume, never noirq). - Verified
tools/asahi/centauri-wifi-pm-tests.pyaddstest_host_sleep_gate(),test_deferred_regulatory(), and 4 corresponding negative controls.
- CI checks (all latest green on
588178f04769):Host tests/host-tests:SUCCESSpr-readiness/readiness / readiness:SUCCESSpr-text/pr-text / pr-text:SUCCESS(after addingRisk:)
- Untested scope: No live T6050 deep-sleep / WoWLAN run was executed on hardware in this pass.
Evidence
- Audited
drivers/net/wireless/apple/centauri/t6050/centauri_wifi.c(command_reply,country_set,channels_apply,alpha_transport_state,alpha_host_power,alpha_resume_locked,centauri_t6050_wifi_suspend,centauri_t6050_wifi_resume,wifi_regulatory,centauri_t6050_wifi_unregister),centauri_pci.cPM ops, andtools/asahi/centauri-wifi-pm-tests.py. - Verified
OPEN|false|MERGEABLE|588178f04769and latesthost-tests,pr-readiness, andpr-textallSUCCESS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Risk: two-way · M5 Pro / M5 Max (T6050 Centauri N1)
What:
Reject N1 Alpha commands while the host is asleep, before publishing a descriptor or touching the PCI BAR. A late cfg80211 regulatory callback could otherwise poll the BAR as the link entered D3hot.
Retain the latest named country and refresh the channel flags after a successful Alpha wake, including suspend unwind. A failed wake keeps the gate closed. Transport loss during replay enters the existing N1 recovery path.
Tested:
Head
588178f047698c70ae3b186f0b46fad5f6a9894a.python3 tools/asahi/run-host-tests.py --only centauriwith prebuilt host tools: 16/16 runs passed. The Wi-Fi PM harness rejected all 14 negative controls, including the four new controls.scripts/checkpatch.pl --strict: 0 errors, 0 warnings, 0 checks.7.3.0-m5-cengate2, native warm-j18build of the head above, default cmdline, MTE on, SEP writes onapple_centauri_t6050probed and held its Wi-Fi association through 2/2 deepmemsleeps with RTC0 wake and WoWLANanyarmed. Both wakes passedvulkaninfoandgpubench-vk compute.light. 0 SErrors, panics, GPU faults or new kernel error signatures against prior J714s logs.The late regulatory callback and replay failure are covered by the host negative controls. The J714s run restored the byte-identical ESP files and booted back into
7.3.0-m5-cdirect15, where both GPU checks passed again.