Skip to content

wifi: brcmfmac: keep BCM4378 receive DMA buffers readable too - #926

Closed
joske wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
joske:brcmfmac-bcm4378-rx-dma
Closed

joske wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
joske:brcmfmac-bcm4378-rx-dma

Conversation

@joske

@joske joske commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Fixes aurora-silicon/alarm-aurora#48.

Extends 25836bd (BCM4387) and 3217ca6 (#383, BCM4388) to the BCM4378 (PCI ID 0x4425). Without this change, M1 and M2 Macs with that chip have no Wi-Fi on the 7.3-based linux-aurora.

Since f0ba5fd, receive buffers are mapped DMA_FROM_DEVICE, which the Apple DART makes write-only. On a 13" MacBook Pro M2 (J493), running testing-20261030.3 (linux-aurora 7.3.0.aurora1-5, firmware BCM4378/5 wl0 … 18.20.383.15), the firmware loads and wld0 appears. After that, every command times out:

ieee80211 phy0: brcmf_msgbuf_query_dcmd_len: Timeout on response for query command
ieee80211 phy0: brcmf_cfg80211_get_channel: chanspec failed (-5)
ieee80211 phy0: brcmf_cfg80211_get_tx_power: error (-5)
ieee80211 phy0: brcmf_run_escan: error (-5)
ieee80211 phy0: _brcmf_set_multicast_list: Setting mcast_list failed, -5

The PCIe DART logs a read fault from the chip just before the commands start timing out:

apple-dart 681008000.iommu: translation fault: status:0x80000020 stream:0 code:0x20 (READ FAULT) at 0xbfdd00d8

These are the same symptoms #383 describes for the BCM4388. The same machine has working Wi-Fi on linux-asahi 7.2.12, which doesn't have f0ba5fd.

This change only touches brcmf_msgbuf_rx_dma_direction() in drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c: it adds BRCM_PCIE_4378_DEVICE_ID to the match and updates the comment.

Since every Apple-firmware Broadcom chip so far needs this, it may be better to key it on the device sitting behind an Apple DART, or on Apple firmware, than to keep extending a list of chip IDs. I've kept this PR to the existing pattern.

Testing: I tested on the same J493 running linux-aurora 7.3.0.aurora1-16 (testing-20261103.9, kernel source 21f7ffc). I built brcmutil, brcmfmac and brcmfmac-wcc from that tree with this change, installed them as module overrides (updates/), and rebooted. Wi-Fi comes up and connects. Without the change, the same kernel fails as described above.

🤖 Generated with Claude Code

On a 13" MacBook Pro M2 (J493, BCM4378, PCI ID 0x4425) the firmware
loads and wld0 appears, but every firmware command then times out
("brcmf_msgbuf_query_dcmd_len: Timeout on response for query
command"), so scans, channel and tx-power queries and multicast setup
fail with -EIO and the machine never associates. Just before, the
PCIe DART reports a read fault from the chip:

  apple-dart 681008000.iommu: translation fault: status:0x80000020
  stream:0 code:0x20 (READ FAULT) at 0xbfdd00d8

The same machine has working Wi-Fi on a 7.2 kernel without commit
f0ba5fd.

Since commit f0ba5fd ("wifi: brcmfmac: Set DMA direction for
msgbuf packet IDs") receive buffers are mapped DMA_FROM_DEVICE, which
the Apple DART makes write-only. Commits 25836bd ("wifi:
brcmfmac: Keep BCM4387 receive DMA buffers readable") and 3217ca6
("wifi: brcmfmac: keep BCM4388 receive DMA buffers readable too") keep
them bidirectional for the BCM4387 and BCM4388, whose firmware reads
posted receive buffers. The BCM4378 firmware shows the same failure;
with this change the J493 associates again.

Match the BCM4378 as well.

Fixes: f0ba5fd ("wifi: brcmfmac: Set DMA direction for msgbuf packet IDs")
Link: aurora-silicon/alarm-aurora#48
Signed-off-by: Jos Dehaes <jos.dehaes@gmail.com>
Assisted-by: LLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

The same change is already in integration/aurora: 2834599 ("wifi: brcmfmac: keep BCM4378 receive DMA buffers readable too") adds BRCM_PCIE_4378_DEVICE_ID to brcmf_msgbuf_rx_dma_direction() with the same comment update. That is why this branch now conflicts in msgbuf.c. Nothing is left to apply here.

@joske

joske commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

yeah I saw that, closing.

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.

brcmfmac: BCM4378 Wi-Fi dead on 7.3 — receive DMA buffers write-only (needs the same fix as BCM4387/BCM4388)

2 participants