Skip to content

wifi: apple: centauri: t6050: warm-reset an N1 found past its ROM - #3955

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
axboe:fix/centauri-t6050-reload
Dec 2, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
axboe:fix/centauri-t6050-reload

Conversation

@axboe

@axboe axboe commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Problem

The T6050 driver's unbind leaves the N1 firmware running. The next probe (a module reload, or an unbind and bind in sysfs) finds the boot stage register non-zero and fails the ROM boot with -EBUSY. Nothing restarts the N1 after that, so Wi-Fi and Bluetooth stay down until a reboot.

Change

When the board describes the warm reset (apple,function-warm-reset), report a ROM boot that finds the stage past zero as a hardware failure (-EIO) instead. The fault recovery from #3346 then warm-resets the N1 and brings its functions back from the ROM, as it does for a firmware that stops. Boards without the warm reset keep -EBUSY.

Tested: K116s, firmware 27.2.
Risk: two-way · T6050 Wi-Fi/Bluetooth probe (apple_centauri_t6050), only when it finds the N1 already running.

Testing

K116s (MacBook Pro 16-inch M5 Pro, firmware 27.2), aura main 7f5a1df5, default command line. Kernel: main 8a42aee + #2355 + both centauri fixes (this one unchanged), ATC0 left out locally (#3598); the module was swapped in and reloaded with modprobe -r btcentauri_t6050 apple_centauri_t6050; modprobe apple_centauri_t6050. Counts: 0 oops/WARN, 0 new kernel errors besides the one probe line below, 1 failed unit (anacron start limit on AC plug-in, also without these patches), no SELinux on Debian.

  • Before: from the code path (the ROM boot's stage check returns -EBUSY and no recovery is queued); not rerun on hardware for this PR.
  • After: the reload warm-resets the N1, the port re-enumerates, Wi-Fi is back and associated 8 s after modprobe. The first probe hits the port mid-reset and logs one failure, then the re-enumerated function probes normally:
pcie-apple 1cb0000000.pcie: port 0: taken down and up for the endpoint's warm reset: reset
apple_centauri_t6050 0000:01:00.0: probe with driver apple_centauri_t6050 failed with error -108
pcie-apple 1cb0000000.pcie: port 0: link retrained after a root-port reset
apple_centauri_t6050 0000:01:00.0: Wi-Fi firmware channel list: 709 bytes, capabilities: 570 bytes
  • Host tests: all tools/asahi/centauri-*-tests.py pass; checkpatch --strict clean.

Still to run

Bluetooth after the reload (kept off on this machine), and a J714s row.

  • Clean-room: no Apple code, strings, firmware, RE output or tuning values
  • No chip/board/firmware-version gate where a hardware property can decide
  • Works on the default kernel command line; no hacks, delays or lab-only paths
  • Safety limits come from the machine, not from constants in code
  • Hardware safety rules followed for every test boot
  • Third-party commits unchanged; reporters and testers credited
  • Commits: human Signed-off-by only; no AI attribution in commits or PR text
  • Tested on the affected hardware; no regression

The driver's unbind leaves the N1 firmware running, so the next probe (a
module reload, or a sysfs unbind and bind) finds the boot stage register
non-zero and fails the ROM boot with -EBUSY. Nothing restarts the N1
after that, and Wi-Fi and Bluetooth stay down until a reboot.

When the board describes the warm reset, report that boot as a hardware
failure instead. The fault recovery then warm-resets the N1 and brings
its functions back from the ROM, as it does for a firmware that stops.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
@axboe
axboe requested review from a team as code owners December 2, 2026 15:24
@axboe
axboe requested review from Acelogic and scottjones December 2, 2026 15:24
@github-actions github-actions Bot added blast:m5 Macs affected, from Merge risk (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 Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Merge readiness at bdc95c46: not ready yet

Check Detail
CI at head ok 9 checks passed
Review ok approved by satchlj
Requested changes ok none
Hardware row at head no no line with the head SHA bdc95c46, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · T6050 Wi-Fi/Bluetooth probe (applecentaurit6050), only when it finds the N1 already running.

Areas: none matched in CODEOWNERS

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

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code audit at bdc95c469b3e (drivers/net/wireless/apple/centauri/t6050/centauri_pci.c) looks clean:

  • In centauri_t6050_rom_boot(), finding stage != 0 when c->warm_reset (apple,function-warm-reset DT property) is present marks c->boot_hw_failed = true and returns -EIO, handing off cleanly to the existing warm-reset fault recovery path (CEN_BOOT_FAILED && boot_hw_failed && link_ready), while boards without the property preserve -EBUSY.
  • Strictly DT-property gated with no board/model checks; DCO, Risk:, checkpatch --strict, centauri-*-tests.py, and K116s reload verification look good.

Waiting on queued CI (apple-build, host-tests, KUnit plan, pr-text) and exact-head T6050 verification before flipping to approve.

@satchlj

satchlj commented Dec 2, 2026

Copy link
Copy Markdown
Member

Exact-head M5 Max (J775c, T6050, Centauri N1, Stage 2 aura 1.0.0b19, default cmdline) one-shot trial at bdc95c469b3ec6f9befa8d16c5a6eef4983e76b3 (built with tools/aurora-bindgen, 0 bindgen warnings):

  • Boot + Wi-Fi/BT + s2idle:
    • wlan0 connected cleanly on 5 GHz (5765 MHz, -51 dBm), gateway ping 5/5 (0% loss, 2.875 ms avg); Bluetooth hci0 bound cleanly (0000:01:00.2/bluetooth/hci0).
    • 2/2 consecutive 15 s RTC s2idle (suspend_stats 2/0): wlan0 reconnected cleanly, gateway ping 5/5 (0% loss, 2.005 ms avg).
  • Sysfs unbind + bind of 0000:01:00.0 (apple,function-warm-reset absent in t6050-j775c.dts):
    • Cleanly exercised the stage != 0 + !c->warm_reset fallback guard: apple_centauri_t6050 0000:01:00.0: N1 automatic startup failed in phase0: -16 (-EBUSY), with 0 oops/WARN/DART faults (OOPS_PRE=0, OOPS_POST=0) and 0 failed systemd units.
  • Clean unaided reboot back to the default kernel (wlan0 up immediately, failed=0).

Scope: t6050-j775c.dts does not describe apple,function-warm-reset, so this verifies boot, Wi-Fi/BT, s2idle, and the !c->warm_reset -EBUSY guard on unbind/rebind; the warm-reset recovery path (-EIO -> fault recovery) is untested here.

@satchlj satchlj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed bdc95c469b3e (wifi: apple: centauri: t6050: warm-reset an N1 found past its ROM):

  • drivers/net/wireless/apple/centauri/t6050.c cleanly distinguishes an N1 already past ROM (stage != 0) with c->warm_reset available (returning -EIO into the existing fault-recovery warm-reset path) from boards without apple,function-warm-reset (preserving -EBUSY), keeping the warm-reset hook device-tree driven.
  • All CI checks (apple-build, host-tests, KUnit plan, pr-text, readiness) are green, DCO and Risk: are present, and exact-head verification landed on both K116s (reload recovery PASS) and M5 Max (J775c, boot + Wi-Fi/BT + 2/2 s2idle + sysfs unbind/rebind exercising the !c->warm_reset -EBUSY guard with 0 faults).

LGTM.

@github-actions github-actions Bot removed the needs-review No approving review from Core or Omarchy Mac yet (bot) label Dec 2, 2026
@DjDeveloperr
DjDeveloperr merged commit e7af5fc into aurora-silicon:main Dec 2, 2026
12 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-hw-row No hardware row at the PR head (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants