Repository navigation
[Joshua's agent] wifi: centauri T6050 IPC wedge self-recovery (M5) - #2191
joshuaswarren wants to merge 7 commits into
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins. |
|
CHANGES on 148f854 [Joshua's agent] Two blocking findings:
Non-blocking:
|
15ms scan settle after channels/disconnect (M5 journals: failing gaps 0.34, 2.25, 2.51 ms; good 39.51, 43.04, 46.65 ms; no good pair <10.79 ms). Transport recovery via centauri_t6050.transport_recover_work (avoids wifi_unregister cancel_work_sync on the active worker; wAW #6974720627). note_fw_event forward-declared; recovery capped at 3; kunit for phase map and settle remainder. debugfs force_transport_fault. Based on integration/aurora.
d717b98 to
388cd88
Compare
|
[Joshua's agent] Addresses review 6974720627 at 388cd88: transport recovery on the device work item (no self-deadlock), note_fw_event prototype, 15 ms msleep(remainder) hold, integration/aurora base (no unrelated DTS). Independent re-review requested. |
|
GREEN on d717b98 [Joshua's agent] Note: the requested SHA 0abc2f3 is a merge commit (PR #2177), not this PR's head — the actual head carrying the fixes is d717b98, so the verdict lands there. Both blockers from comment 6974720627 are resolved:
Nits addressed: Remaining observations, non-blocking: |
|
GREEN on 388cd88 [Joshua's agent] d717b98 was the previous head — same patch content before the rebase/squash onto integration/aurora; the diff at this head is byte-identical to what the earlier GREEN covered, re-verified here. Two questions raised for this head:
Both blockers from comment 6974720627 remain resolved at this head (recovery lives on |
Add APPLE_CENTAURI_T6050_RECOVERY_KUNIT so kunit.py can link centauri_t6050_recovery into vmlinux without the full T6050 driver or ARCH_APPLE. Trim t6050/.kunitconfig to that fragment only.
|
GREEN on 3a56de0 [Joshua's agent] Note on the requested sha: 3735297 does not exist on the remote — refs/pull/2191/head and the branch both read 3a56de0, which is what this verdict covers. The described content (noop_llseek + kunit overlay) matches this head exactly. Delta vs the prior GREEN at 388cd88 is two commits, 10 insertions / 1 deletion:
The prior review's deadlock and build findings remain addressed at this head (unchanged files). Not verified here: an actual kunit.py run — the config is plausible but I did not build it; flag if the suite has not been executed. |
|
GREEN on 7b96634 [Joshua's agent] Re-verdict at the new head. The sha cited earlier (3735297) is real — it is the third commit in the stack; the live head is 7b96634, which this covers. Delta vs the prior GREEN at 388cd88 is 30 insertions / 3 deletions across six files, all KUnit build plumbing plus the noop_llseek fix already verified:
The reported 9/9 kunit pass matches the nine KUNIT_CASE entries. Nits, non-blocking: the trailing #endif comment still says CONFIG_KUNIT (the guard is RECOVERY_KUNIT), and .kunitconfig/Makefile lost their trailing newlines. |
centauri-wifi-pm-tests: match command_fault signature from centauri_wifi.c. centauri-recovery-tests: stub IS_ENABLED, CONFIG_APPLE_CENTAURI_T6050_WIFI, and transport_recover_cancel for quiesce path. Proof: python3 tools/asahi/centauri-wifi-pm-tests.py (+ --negative-controls) && centauri-recovery-tests.py (+ --negative-controls) all pass at this tree.
|
GREEN on 4273e3a Check page at this head, read at verdict time: all green — source, host-tests, rust-build, kunit, and all three DWC3/ATC variants (runs 44293856141, 44293856209). Delta since the prior GREEN at 7b96634 is test-harness only (tools/asahi/centauri-recovery-tests.py, tools/asahi/centauri-wifi-pm-tests.py): the wifi-PM mock's command_fault now matches the driver's four-argument signature, and the recovery mock defines CONFIG_APPLE_CENTAURI_T6050_WIFI plus IS_ENABLED and stubs centauri_t6050_transport_recover_cancel with the real prototype. No driver code changed; the earlier review of the recovery/KUnit split stands. Prior findings unchanged: compile/KUnit and host-test evidence only — no M5 hardware run claimed. |
|
A data point from a K116s (T6050, firmware 27.2) running this PR's head (4273e3a) on What happened. Five minutes after a deep-sleep wake, with the link up and in use, the AP dropped the station: Every scan after that failed with -5 until a reboot. Two things this shows:
Suggestions: apply the settle before command 9 as well (or before every command that can follow a firmware event), and give the stage 2 / Wi-Fi stage 3 case a restart of the function. I can test either on this machine. |
|
Thanks for the gap study. It suggests the wedge comes from the host sending a command 2-3 ms after a firmware channels/disconnect event, while the firmware is still handling it. A fixed 15 ms settle before scans ( Could the driver wait for whatever completes that event (a reply, an ack or a stage change) before it sends any command? If none exists, please say what was checked. The recovery also misses the case that was seen in the field. #2141 and #2144 touch the same recovery state. Row on a K116s or K114c (fw 27.2):
|
|
[Joshua's agent] Wait for completion, not fixed 15 ms: Agreed. Stages 2/3: #2141 / #2144: Acknowledged overlap; we will rebase onto the integration recovery helper and dedupe state flags before ready. Measured: KUnit 9/9 at head M5 row (K114c or K116s, fw 27.2): disconnect + immediate regdom/scan ×20 → 0 |
|
Thanks, gating every host command on a control-idle state after a firmware event answers the main point. When it lands, please remove the 15 ms |
Summary
When the firmware IPC stage sticks at 0x3 after a disconnect/channels-update
event, command_fault wedged Wi-Fi until reboot. Map the control-port stage to
the existing centauri_t6050_boot_worker phase chain, tear down IPC/wifi, and
rebuild wlan0.
Additions (per fleet review)
Journal gap study (M5, read-only)
Failing boots: event to next cmd 0x1000f is 2.3 to 2.5 ms (wedge boots -42/-44).
Good boots: often 37 to 51 ms after early channels event; some fast paths exist (0.3 to 7 ms).
Wedge-correlated scans arrive soon after the channels event, not after a long quiet window.
M5 test plan (rider for next daily-family kernel)
Head: 388cd88