Skip to content

Bluetooth: mt7932: support modules and system suspend - #176

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
j700/mt7932-bt-pm
Oct 8, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
j700/mt7932-bt-pm

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

The J700 Bluetooth transport cannot be selected when Bluetooth is modular or system sleep is enabled. Make the existing PR #153 transport tristate, add HCI suspend/resume around a bounded firmware quiesce/restore handshake, stop traffic publication while quiesced, and roll back failed sleep admission.

Removal unregisters HCI, quiesces firmware, synchronizes work and interrupts, and disables/drains PCI bus mastering before releasing device-visible storage. If quiescence or the drain cannot be confirmed, DMA storage remains retained until reset. Firmware/calibration packaging and the existing contributor notices/history are preserved; the original radio work credits Eryk Wieliczko, DjDeveloperr, Acelogic and Ryan Murray.

Validation completed:

  • Strict checkpatch: zero errors/checks; only the project's required Assisted-by: LLM trailer-format warning.
  • Author/trailer scan and git diff --check pass.
  • The actual notification handler passes 56 synthetic coherent-memory assertions with ASan/UBSan: host sleep, stale and repeated notifications, quiesce, restore and invalid values.
  • Test composition with the integration tree has no conflicts.

Remote kernel/module and DTB checks are running. Neo qualification is in progress: pair, connect, remote SDP, suspend-to-idle and removal have not yet been validated. The synthetic tests are not firmware acceptance or full concurrency proof.

Hibernation, automatic firmware recovery, warm reprobe, HCI queue backpressure and simultaneous headset/audio behavior remain unsupported or unqualified. Use a cold boot after removing/faulting an activated transport. The retained PCIe bootstrap provider and the matching board configuration are separate follow-ups; this patch does not claim their lifecycle or hardware validation.

🤖 Generated with Claude Code

The MT7932 PCIe transport cannot be selected with modular Bluetooth or
system sleep enabled. Make the existing transport tristate and coordinate
firmware quiescence with HCI suspend before PCI power transitions.

Wait for the firmware's system-sleep acknowledgment before completing
suspend. Restore the transport before resuming HCI, and undo the sleep
request if suspend fails. Keep ring publication stopped while quiesced
and preserve the DMA arena across sleep. Invalid notifications and failed
restoration close the transport instead of retrying an uncertain state.

Unregister HCI, quiesce firmware and synchronize transport work and
interrupts on removal.
Release device-visible storage only after bus mastering is disabled and
pending PCI transactions drain; retain it if that cannot be confirmed.
Hibernation, firmware recovery and warm reprobe remain unsupported.

This extends the existing MT7932 transport and preserves its contributor
notices and firmware/calibration path.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide merged commit 1472fb2 into aurora-wip Oct 8, 2026
RyanTheTide added a commit that referenced this pull request Oct 8, 2026
[follow-up to #176] Bluetooth: mt7932: accept nonzero HCI registration indices

Original contributor commits are preserved. Conflict resolutions retain the audited shared driver APIs and their integrated review fixes.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide deleted the j700/mt7932-bt-pm branch October 8, 2026 10:22
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.

1 participant