Skip to content

wifi: apple: centauri: attach Bluetooth after a restart from debugfs - #3459

Merged
RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
m0d16l14n1:fix/centauri-bt-after-debugfs-restart
Dec 1, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:mainfrom
m0d16l14n1:fix/centauri-bt-after-debugfs-restart

Conversation

@m0d16l14n1

@m0d16l14n1 m0d16l14n1 commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

What: attach Bluetooth again after an N1 restart started from debugfs (rom_boot 4). Wi-Fi came back, but hci0 stayed away: the Bluetooth function was re-enumerated while its firmware was still down, btcentauri gave up waiting, and nothing attached it again. The fault path's restart and rom_boot 3 already attach it once the IPC runs; this does the same after rom_boot 4. This replaces the N1 test branch #3166 for this topic.
Tested: J815 (MacBook Air 15" M5) with this head's code: apple_centauri and btcentauri built from the N1 tester merge cded55efa713 and swapped live into the running j815/prtest-r8 (7b4bbe9) kernel (see Evidence), no centauri or Bluetooth words on the command line: PASS. After rom_boot 4, Wi-Fi and hci0 were both back within 1 s of the IPC start (before this change: hci0=no after 60 s); the fault path's restart (rom_boot 5) brought Wi-Fi and hci0 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), only when someone writes 4 to the debugfs rom_boot. Normal boot and the fault path are unchanged.
Not yet: a J813 row; this branch tested on its own.

Details

One commit, wifi: apple: centauri: attach Bluetooth after a restart from debugfs: the rom_boot 4 path calls the same Bluetooth attach the fault path's restart uses, after the IPC has started. Base: main ae0119904114; independent of the other N1 PRs.

Evidence

Tested tree: cded55efa713 = this branch + #3207 + #3458 and the BT audio, crash-record and AWDL branches. This head's diff is the same as in that merge. Modules swapped live into J815 7.3.0-aurora-j815-dev (j815/prtest-r8 7b4bbe9), command line console=tty0 user4k=on pcie_aspm=off idle=nop arm64.nowfxt plus the image's root/ESP words, apple_sep.xart_writes=0 apple_sep.provision_keybag=0 (removed from main, logged as unknown and ignored) and aurora.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.

== N1 restart through the warm reset (rom_boot 4)
INFO after the restart: wifi=wlp1s0f0 hci0=yes (1 s)
PASS recover: Wi-Fi rejoined and hci0 back in 15 s
PASS bt: no HCI timeouts this boot
PASS regress: no N1 driver errors since the kit started
PASS regress: 0 failed units

Before this change, same kit: after the restart: hci0=no (60 s).

A restart through rom_boot 4 brought Wi-Fi back but left hci0 away:
the Bluetooth function was re-enumerated while its firmware was still
down, btcentauri gave up waiting, and nothing attached it again. The
fault path's restart and rom_boot 3 both attach it once the IPC runs.

Do the same after rom_boot 4. Seen on the J815 test kit: "after the
restart: hci0=no (60 s)", while the fault path's restart that followed
brought hci0 back in 16 s.

Signed-off-by: Nick <[email protected]>
@m0d16l14n1
m0d16l14n1 requested review from a team as code owners November 28, 2026 01:47
@github-actions github-actions Bot added blast:m5 Macs affected, from Merge risk (bot) ci-failing A check failed at the PR head (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Merge readiness at af388dc6: not ready yet

Check Detail
CI at head ok 20 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok comment at af388dc6
Conflicts ok none
PR text ok Risk: two-way · N1 boards on the shared transport (J813, J815 and the other T8142/T8152 boards), only when someone writes 4 to the debugfs romboot. Normal boot and the fault path are unchanged.

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at af388dc6

Blockers: none (note: remaining queued KUnit CI jobs must finish green before merge).

Checked: no Apple material, no AI attribution, no chip/board/firmware gates, no cmdline hacks, human Signed-off-by, centauri_boot_write() value == 4 recovery path matches centauri_recover_work() Bluetooth re-attach (centauri_attach_beta()), J815 hardware row (cded55efa713, identical diff, Wi-Fi and hci0 recovered within 1 s after rom_boot 4, 0 errors), apple-build, host-tests, and pr-text green.

Evidence
  • Checked drivers/net/wireless/apple/centauri/centauri_pci.c:375-383: value == 4 calls centauri_recover(c) under c->boot_lock, leaving IPC started on success, just like value == 3 (centauri_start_ipc(c)) and centauri_recover_work() (which also calls centauri_attach_beta(c) after recovery). Calling centauri_attach_beta(c) after releasing c->boot_lock when (value == 3 || value == 4) && !ret is safe and consistent.
  • Hardware row: J815 (cded55efa713, identical diff) PASS: after rom_boot 4, Wi-Fi and hci0 returned within 1 s (previously hci0 stayed missing after 60 s); 20/20 centauri host tests, 0 driver errors.
  • CI at af388dc6: apple-build, host-tests, pr-text, KUnit ane-boot/ane-pm/dcp-fabric/dcp-topology/asahi PASS; remaining KUnit jobs queued/in-progress.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge-train status at af388dc6 (App approval and J815 row noted). Under the 6-point rule this still needs: (a) green KUnit; (b) a regression row on a second family, since the centauri N1 driver also runs on T6050 (K114s) and T8152 (J873g). We'll ask for a K114s smoke covering this stack; (c) the code-owner ping, done here: @DjDeveloperr, merge earliest 16:52 AEDT once (a) and (b) are in. Revert: git revert -m 1 <merge>.

@erikwb

erikwb commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

J716c (16-inch M5 Max, T6050) at af388dc6: no regression on a T6050 board: N1 Wi-Fi associates (0% gateway ping loss) and Bluetooth is powered after boot. The debugfs rom_boot 4 restart this change touches is on the T8142/T8152 transport and was not exercised here.

Evidence

Batched kernel 7.3.0-ewb368+ = main 219311530ef0 + #3605 222e0e6b + #3311 cc26f9ee + #3310 5fb10c0a + #3458 625fd0f1 + #3459 af388dc6 + #3460 f8442a49, each head merged unchanged. The J716c DTB is built without #include "t6050-media.dtsi" (main hangs the J716c at boot otherwise, #3618). One-shot trial boot on the default command line plus watchdog.open_timeout=120 (recovery watchdog for test boots only); compared with the default 7.3.0-ewb342+ on the same Mac, dock and network.

iw dev wlan0 link: associated at 5240 MHz, -37 dBm; 20 pings to the gateway 0% loss; bluetoothctl show: powered. Kernel errors are the same set as the default boot; failed units: aurora-peripherals.service only, same as the default boot.

@github-actions github-actions Bot removed needs-hw-row No hardware row at the PR head (bot) ci-failing A check failed at the PR head (bot) labels Nov 29, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merging at af388dc6427f (B2 merge train, 12-01 merge bar). Approval at this head: aurora-silicon-review[bot]. Row: the hardware row at af388dc that the readiness check found (PR body or comment). CI: linux train L4 = main (after L3) + 34 approved PRs (#3419 dropped: conflicts): Apple driver compile pass, Apple DTBs W=1 pass, planned KUnit ane-boot/clpc/ane-pm/dcp-fabric/dcp-topology/dcp-display/macaudio/asahi/sep all pass, host tests apple-dcp + apple-scaler-recovery pass (the red host-tests on some heads were base failures since fixed on main). The rest of the hosted run is queued behind the backlog. Revert: git revert -m 1 <merge commit>.

@RyanTheTide
RyanTheTide merged commit c544aab into aurora-silicon:main Dec 1, 2026
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants