Repository navigation
apple: reload brcmfmac after resume, some Broadcom Wi-Fi parts don't survive S3 - #11434
Closed
TheoAndersen wants to merge 1 commit into
Closed
TheoAndersen wants to merge 1 commit into
TheoAndersen wants to merge 1 commit into
Conversation
…survive S3 The PCIe/msgbuf brcmfmac parts (BCM43602, BCM4350/4355/4364, BCM4377/4378/4387) can leave the firmware unresponsive after S3: every command times out (brcmf_msgbuf_query_dcmd: Timeout on response for query command) until the driver is unbound and rebound. Same signature and chipset family as Debian #849381, open since kernel 4.8, no real upstream fix. Affects any Mac whose Wi-Fi brcmfmac drives over PCIe, but in practice mostly hits older MacBook Pros: BCM43602 (2015-2017 models) is the part most commonly affected. The BCM4360 in 2013-2015 Macs is unaffected -- it runs the out-of-tree wl driver instead of brcmfmac, so it never hits this bug and is deliberately excluded from the detection below. Reproduced on a MacBookPro11,5 (15-inch MacBook Pro, Mid 2015, BCM43602) simply by closing and reopening the lid, which is this machine's default S3 suspend/resume trigger. Same detection as fix-brcmfmac-supplicant.sh, since it's exactly the PCIe/msgbuf population that hits this. Unbind/bind is used rather than modprobe -r/modprobe: something (an open NetworkManager netdev, a cfg80211 wdev reference) reliably keeps the module in use across resume, so modprobe -r never actually removes it, and modprobe afterward is then a no-op that never re-probes a device manually detached via sysfs -- confirmed on hardware, the device stayed unbound and Wi-Fi never came back.
TheoAndersen
force-pushed
the
apple-brcmfmac-resume-fix
branch
from
September 12, 2026 08:59
8cd17ed to
f03ca3e
Compare
TheoAndersen
marked this pull request as ready for review
September 12, 2026 09:01
4 tasks
Member
|
Automated duplication check: this pull request looks similar to #10332, which covers the same brcmfmac resume reload. I keep that one open and close this one to consolidate review. If you feel this is the wrong decision, please open the PR again with a note on the difference. |
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.
Affects any Mac whose Wi-Fi brcmfmac drives over PCIe, but in practice mostly hits older MacBook Pros: BCM43602 (2015-2017 models) is the part most commonly affected. Reproduced on a MacBookPro11,5 (15-inch MacBook Pro, Mid 2015, BCM43602) simply by closing and reopening the lid, which is this machine's default S3 suspend/resume trigger.
The PCIe/msgbuf brcmfmac parts (BCM43602, BCM4350/4355/4364, BCM4377/4378/4387) can leave the firmware unresponsive after S3: every command times out (
brcmf_msgbuf_query_dcmd: Timeout on response for query command) until the driver is unbound and rebound. Same signature and chipset family as Debian #849381, open since kernel 4.8, no real upstream fix.Detection reuses the exact chip allowlist from
fix-brcmfmac-supplicant.sh(sourced from brcmfmac's ownbrcm_hw_ids.h), which deliberately excludes the BCM4360 in 2013-2015 Macs: it runs the out-of-treewldriver instead of brcmfmac, so it never hits this bug. Scoping is three layers deep: the installer only runs on a T2 Mac or an Apple machine with one of these specific Broadcom IDs; the runtime helper re-scans for the same allowlist; and even then it only acts if the matched device is currently bound tobrcmfmac— never touching anything else.Unbind/bind is used rather than
modprobe -r/modprobe: something (an open NetworkManager netdev, a cfg80211 wdev reference) reliably keeps the module in use across resume, somodprobe -rnever actually removes it, andmodprobeafterward is then a no-op that never re-probes a device manually detached via sysfs — confirmed on hardware, the device stayed unbound and Wi-Fi never came back.A systemd unit runs the reload after every sleep target (suspend/hibernate/hybrid-sleep/suspend-then-hibernate), installed both on fresh setup and via a migration for existing installs. Covered by a shell test that simulates the sysfs unbind/bind cycle and exercises the T2/non-T2 detection matrix.