Repository navigation
mt7932: start Bluetooth only after the Wi-Fi function initialized - #227
Merged
Merged
Conversation
When initialization fails and the DMA of function 0 cannot be stopped, mt7932-fullmac keeps the binding to retain that DMA. Whether the Wi-Fi firmware is running therefore cannot be told from the binding, which is what the Bluetooth transport on function 1 waits for before it starts its own firmware on the shared radio. Record when the probe has finished initialization and export mt7932_fullmac_ready() to report it. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
The Bluetooth transport waits until function 0 is bound to mt7932-fullmac, so that its firmware starts after the Wi-Fi firmware as in the tested sequence. Being bound does not mean the Wi-Fi firmware is running: when the Wi-Fi initialization fails and its DMA cannot be stopped, mt7932-fullmac keeps the binding to retain that DMA. Bluetooth then probes anyway and starts its firmware on the shared radio next to a failed Wi-Fi function. Once function 0 is bound, also require mt7932_fullmac_ready(). The Wi-Fi probe finishes initialization before it returns, so a bound function that is not ready has failed, and the Bluetooth probe fails with -ENODEV. The transport now calls into the Wi-Fi module, so it depends on MT7932_FULLMAC plainly: it can no longer be built in while the Wi-Fi driver is a module. Fixes: 920e89a ("Bluetooth: mt7932: wait for the Wi-Fi function before starting") Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
This was referenced Nov 20, 2026
media: apple: ave: M3 generation (T8122/T603x): name the encoder resources and bind probe-only
#2362
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mt7932: start Bluetooth only after the Wi-Fi function initialized
Found by Sashiko review of #204.
The Bluetooth transport on function 1 waits until function 0 is bound to
mt7932-fullmac, so thatits firmware starts after the Wi-Fi firmware, as in the tested sequence. Being bound does not mean
the Wi-Fi firmware is running: when Wi-Fi initialization fails and its DMA cannot be stopped,
mt7932-fullmackeeps the binding to retain that DMA. Bluetooth then probed anyway and started itsfirmware on the shared radio next to a failed Wi-Fi function.
wifi: mt7932: report whether the Wi-Fi function initializedmt7932_fullmac_ready()(ininclude/linux/mt7932.h) reports it for a function bound tothis driver.
Bluetooth: mt7932: start only after the Wi-Fi function initializedmt7932_fullmac_ready().ready has failed. The Bluetooth probe then fails with
-ENODEVand logs why.MT7932_FULLMACplainly.Building it in while the Wi-Fi driver is a module is no longer possible (mt7932: name the forbidden-channel marker; make Bluetooth depend on the Wi-Fi driver #207 had allowed it
on purpose; it would now fail to link).
Fixes: 920e89a2e3df ("Bluetooth: mt7932: wait for the Wi-Fi function before starting")Testing
4f3a64e7baa9with all six review-fix branches merged (J700 configuration, plusMAC80211_HWSIM=mfor one regulatory test). It was compared, with the same scripts, against the Neo's current default kernel (the tip plus the PMC/CLPC series) booted on the same boot chain. The branches were then rebased ontoccedac0c6a30with unchanged diffs, and the Neo test was repeated there (see the re-check below).dcp-qualchecks pass), keyboard/trackpad, Wi-Fi, Bluetooth, Touch ID (3 fingers), audio enumeration (no playback), battery, thermal, cpufreq/cpuidle, camera, GPU (vkcube, glmark2 2277 vs 2241). 0 Oops/WARN/SError; the same 15 error/warning-like dmesg lines on both boots; no DART fault.mt7932_bt_pcienow depends onmt7932-fullmacinmodinfo, andmt7932_fullmac_readyisexported.
FIRMWARE_READYat 7.50 s, Bluetooth enabled at 7.70 s,BT_HCI_SETUP_OK, hci0 powered, 22 devices in a 10 s scan (default kernel: 7.38 s / 7.57 s, 25devices).
it cannot be forced safely, so the refusal path was not exercised on hardware.
ccedac0c6a30(adds the DART display hand-off fix, iommu: apple-dart: keep live T8140 firmware translations out of TLB invalidates #221), with theNeo default's configuration (including PMC/CLPC), one-shot boot, compared with the default kernel
booted right after it on the same boot chain: identical results. All smoke items pass (glmark2 2234 vs
2205),
dcp-qualboot, brightness and 3 DPMS cycles pass, 0 D452/D454 among about 1005 DCP callbacks,0 DART faults, 0 Oops/WARN. The only extra log line was an intermittent
sn201202x 1-0c: failed to configure Type-C connection: -110, also seen on other kernels' boots and unrelated to this series.Checks
checkpatch.pl --strict: 0 errors, 0 checks; 1 warning per commit, theAssisted-bytrailerformat.
MT7932_FULLMACy/m/n xBT_MTK7932_PCIEy/m,olddefconfig): the only change isWi-Fi
mwith Bluetoothy, which now resolves Bluetooth tom(it wasy). No Kconfig warnings.ccedac0c6a30(clang 22.1.6, LLVM=1): with the J700 configuration (the Neo default's) every commit buildsImage modules dtbsand passes aW=1build ofdrivers/pmdomain/apple/,drivers/gpu/drm/apple/,drivers/net/wireless/mediatek/mt7932/anddrivers/bluetooth/; with the M1/M2 configuration (Fedora Asahi based) every commit passes the sameW=1build, and the merge of all six review-fix branches builds in full with no warning that a full build of the unpatched tip lacks. No new warnings (the 4 existingW=1kernel-doc lines ondcp_crtc_send_page_flip_eventare unchanged). The same checks passed on4f3a64e7baa9and3fecb279810d.Provenance
Written for this tree; tested on the MacBook Neo (J700).
🤖 Generated with Claude Code