Repository navigation
wifi: apple: centauri: keep the firmware crash record and restart a silently stopped Alpha - #3460
m0d16l14n1 wants to merge 4 commits into
Conversation
…, and data path Add full station telemetry, channel survey, band capability reporting, ethtool firmware version reporting, and data-path improvements: - Parse firmware statistics reports using packed wire structures with compile-time layout checks: TX retries/failures and live RX/TX bitrates (TLV 0xf901), beacon RX/loss (TLV 0xf915), TX power and rate history (TLV 0xf920), per-chain RSSI and noise floor (TLV 0xf923), station noise (TLV 0xf908), and CCA channel survey (TLV 0xf903). - Populate wiphy->fw_version from firmware version query and wire ethtool_ops.get_drvinfo = cfg80211_get_drvinfo on both T8142/T8152 and T6050 Wi-Fi netdevs so ethtool -i reports the running firmware version. - Populate HT, VHT, and 2.4/5/6 GHz HE band capabilities, decode disconnect reason codes, apply initial firmware regulatory country hint, and avoid restricting channel widths absent from 20 MHz-only lists. - Add NAPI GRO receive processing, TX in-flight cap with bypass watchdog, and TCP pacing shift; add Centauri driver documentation. Signed-off-by: Nick <[email protected]>
The firmware reserves a crash region in its secondary memory, which debugfs firmware_crash reads. A restart after a firmware fault frees that memory before anyone can read it, so the region of the firmware that stopped is lost and the fault leaves no record of its own. Copy the region before the restart frees anything and expose the copy as debugfs firmware_crash_saved. The restart log says how large it was and whether it held anything. Signed-off-by: Nick <[email protected]>
Alpha can leave execution stage 2 without raising a fault interrupt. The link worker then only reported a disconnect and the scan worker an aborted scan, and Wi-Fi stayed down until the module was reloaded. When either worker finds Alpha out of stage 2 while the transport is neither stopping nor paused, request the firmware restart. Signed-off-by: Nick <[email protected]>
The firmware faults seen on the J815 leave nothing to read: the crash region in secondary memory is all zero after an Alpha stop, and the restart frees the Alpha DRAM log, the only record the firmware keeps of what it did last, together with the rest of the IPC buffers. When fwlog_start set the log up, copy it before the restart frees it and expose the copy as debugfs firmware_log_saved; the restart log gives its size and the consumer and producer indices. Log the Alpha execution stage value seen when the stop is detected, which the fault message did not give. Signed-off-by: Nick <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: MERGE at f8442a49
Blockers: none in code (note: stacked on #3458 — merge after #3458 lands and remaining queued KUnit CI jobs finish green).
Checked: no Apple material, no AI attribution, no new chip/board/firmware gates, no cmdline hacks, human Signed-off-by, centauri_keep()/centauri_save_crash() locking (boot_lock), alpha_log SZ_4M bounds before 0x10/0xb0 header reads, kvfree() cleanup in centauri_remove(), alpha_halted guard (!stopping && !transport_paused), J815 recovery row (rom_boot 5, 40960-byte crash region saved, Wi-Fi + hci0 recovered in 15 s, 20/20 host tests), apple-build, host-tests, and pr-text green.
Evidence
- Inspected the incremental diff (
625fd0f1...f8442a49) acrosscentauri.h,centauri_ipc.c,centauri_pci.c,centauri_wifi.c, andcentauri.rst. - Verified
centauri_save_crash()runs underboot_lock(asserted vialockdep_assert_held),c->ipc->alpha_logis allocated asSZ_4M(so header reads at+0x10and+0xb0are always in bounds),firmware_crash_saved_read/firmware_log_saved_readserialize underboot_lock, andcentauri_remove()callskvfree()on both saved buffers afterdebugfs_remove_recursive(). - Hardware row: J815 (
cded55efa713, identical diff) PASS onrom_boot 5fault recovery (40960-byte crash region copied, Wi-Fi +hci0back in 15 s, 0 driver errors). - CI at
f8442a49:apple-build,host-tests,pr-text,KUnit ane-boot/ane-pm/dcp-fabric/dcp-topologyPASS; remaining KUnit jobs queued. - Merge order: merge #3458 first.
|
Merge-train status at |
|
J716c (16-inch M5 Max, T6050) at EvidenceBatched kernel
|
What: keep what the N1 Wi-Fi firmware left behind when it stops, and restart it when it stops without saying so. The restart after a firmware fault freed the crash region and the Alpha DRAM log before anyone could read them. They are now copied first and kept as debugfs
firmware_crash_savedandfirmware_log_saved, and the restart log gives their size. Alpha can also leave execution stage 2 without a fault interrupt; the link and scan workers then reported only a disconnect or an aborted scan, and Wi-Fi stayed down until a module reload. Now they request the restart. Stacked on #3458 (basefeat/centauri-wifi-stats625fd0f15687); this PR's own commits are the three listed under Details. This replaces the N1 test branch #3166 for this topic.Tested: J815 (MacBook Air 15" M5) with this head's code:
apple_centauriandbtcentauribuilt from the N1 tester mergecded55efa713and swapped live into the runningj815/prtest-r8(7b4bbe9) kernel (see Evidence), no centauri or Bluetooth words on the command line: PASS. A firmware stop from debugfs (rom_boot 5) took the fault path: the crash region was copied (40960 bytes), Wi-Fi rejoined andhci0was back in 15 s. Centauri host tests 20/20. Regression: 0 SELinux denials (SELinux not built on this image), 0 failed units, 0 N1 driver errors, 0 WARN/BUG/Oops.Risk: two-way door; N1 boards on the shared transport (J813, J815 and the other T8142/T8152 boards). The copies cost one allocation of the region's size per restart. The new restart trigger fires only when Alpha is out of stage 2 while the transport is neither stopping nor paused. T6050 boards are not reached (#3346 covers their warm-reset recovery).
Not yet: a real firmware crash captured (the debugfs stop leaves the region all zero); the silent-stop restart and the DRAM log copy have not fired on hardware in this run (no silent stop happened, and the firmware log was not started); a J813 row.
Details
Commits of this PR (on top of #3458):
wifi: apple: centauri: keep the firmware crash region across a restart: copy the crash region in the firmware's secondary memory before the restart frees anything; debugfsfirmware_crash_saved; the restart log says how large it was and whether it held anything.wifi: apple: centauri: restart the firmware when Alpha stops silently: the link and scan workers check the Alpha execution stage and call the existing recovery request when it has left stage 2.wifi: apple: centauri: keep the Alpha DRAM log across a restart: whenfwlog_startset the log up, copy it before the restart frees it; debugfsfirmware_log_saved; log its size, the consumer and producer indices, and the stage value seen.The restart paragraph in
centauri.rstdescribes all three.Evidence
Tested tree:
cded55efa713= this branch + #3207, #3459 and the BT audio and AWDL branches. This head differs from what was tested only in commit messages and in two lines oftools/asahi/run-host-tests.pythat register other branches' host tests. Modules swapped live into J8157.3.0-aurora-j815-dev(j815/prtest-r87b4bbe9), command lineconsole=tty0 user4k=on pcie_aspm=off idle=nop arm64.nowfxtplus the image's root/ESP words,apple_sep.xart_writes=0 apple_sep.provision_keybag=0(removed frommain, logged as unknown and ignored) andaurora.untested_commit=0 aurora.alphasleep=0(stop the test initramfs setting its opt-ins, so the module defaults are what run); no centauri or Bluetooth words.