Skip to content

[4/5] wifi: brcmfmac: Coordinate retained firmware with J713 S2R - #1383

Closed
erikwb wants to merge 1 commit into
j713/radio-s2r-pciefrom
j713/radio-s2r-wifi
Closed

erikwb wants to merge 1 commit into
j713/radio-s2r-pciefrom
j713/radio-s2r-wifi

Conversation

@erikwb

@erikwb erikwb commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Coordinate brcmfmac with the managed J713 radio host so reset work cannot race the shared PCIe sleep transaction. Drain reset work, require completed asynchronous setup, and report the firmware D3 acknowledgment and resume result. Reopen reset work only after both radio functions finish recovery.

Aborted suspend can overlap an asynchronous setup failure and driver unbind. Serialize deferred cleanup with the endpoint device lock and require the same driver binding to own the pending cleanup. A threaded regression covers removal ordering, replacement bindings and repeated completion; other hosts retain their existing path.

Part 4/5 of J713 native radio S2R, stacked on #1314 at 00f5d3e3f848. stack/j713-radio-pr1314 mirrors that PR's head so each subsystem has a separate review diff in this repository.

Series order: #1378 → #1381 → #1382 → #1383 → #1384.

Depends on #1382.

Validation on this base:

  • Full arm64 Image, modules and DTBs; DART/PCIe module and no-provider build configurations.
  • Nine focused host suites, including callback-lifetime interleavings and four rejected mutations; ASan/UBSan lifetime run; checkpatch clean for all five commits.
  • J713: clean boot, one suspend-abort/unwind test and three consecutive 31-second RTC deep sleeps on one boot. Wi-Fi gateway traffic and Bluetooth Read Local Version succeeded after every wake; all ten CPUs, internal panel, root storage and thermal checks passed without kernel warnings or taint.

Qualification covers radio recovery in the minimal sleep profile. GPU, external displays and SIO/audio were excluded, SLC allocation remained off, and paired Bluetooth traffic was not tested.

Drain reset work before suspending the managed radio and require
completed asynchronous setup. Report the D3 acknowledgment and resume
result to the host owner, keeping reset work blocked until both radio
functions finish recovery. Preserve the existing path on other hosts.

Signed-off-by: Erik Bourget <erik@ebourget.net>

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new paths are gated on apple_radio_sleep_owned() and the radio-sleep.h stubs, so other hosts keep the existing suspend/resume behaviour. brcmf_pcie_reset() now clears setup_complete on every host, but only the owned path reads it.

Remaining items:

  1. brcmfmac/pcie.c is used on every Apple machine with this radio family. Please add a suspend/resume run on one non-J713 machine showing no change there.

  2. CI has not run on this head.

This can land only after the rest of the series (#1314, #1378, #1381, #1382).

@erikwb

erikwb commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #1314 (authorship kept), which carries the J713 radio sleep work from here on. Closing in favour of it.

@erikwb erikwb closed this Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants