Repository navigation
Bluetooth: hci_bcm4377: cap the ACL MTU at what the ACL ring takes - #3138
Merged
Merged
Conversation
The host-to-controller ACL ring is set up with a mapped payload of MAX_ACL_PAYLOAD_SIZE (HCI_MAX_ACL_SIZE of data plus the header), and bcm4377_enqueue() refuses anything larger. The core fragments outgoing ACL data to the MTU the controller reports in Read Buffer Size, which the driver doesn't limit. On a 15-inch M4 MacBook Air (J715) the controller reports an ACL MTU of 2586, so every fragment above 1028 bytes is dropped: hci_bcm4377 0000:01:00.1: payload len 1451 is too large for ring 5 (max is 0 or 1032) Bluetooth: hci0: sending frame failed (-22) Small traffic gets through, but anything that sends full-size fragments breaks. Over Bluetooth tethering (BNEP), HTTPS transfers stall and fail, and the ACL link can stall until it is killed. Cap acl_mtu and le_mtu at HCI_MAX_ACL_SIZE in post_init, which runs after the init sequence has read the buffer sizes and before any connection. Sending fragments smaller than the controller allows is always valid. A controller that reports 1024 or less, like the M1's (1021), is unaffected. Signed-off-by: Kazuhide Takahashi <[email protected]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
satchlj
approved these changes
Nov 25, 2026
satchlj
left a comment
Member
There was a problem hiding this comment.
Verdict: MERGE at 2fcf03ccec62
Blockers: none
Checked: Full diff in drivers/bluetooth/hci_bcm4377.c, exact-head hardware row, and live CI status.
Evidence
- Audited the 45-line diff capping ACL MTU to the ACL ring capacity in
hci_bcm4377.c; bounds and existing ring invariants are preserved. - Exact-head hardware verification and all CI checks on
2fcf03ccec62are green.
Contributor
|
|
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.
What:
hci_bcm4377drops every outgoing ACL fragment above 1032 bytes, because the core fragments to the controller's reported ACL MTU (2586 on the J715) while the driver's ACL ring takes at most 1032. Capacl_mtuandle_mtuatHCI_MAX_ACL_SIZEafter init.Tested: J715 M4 Air, the everyday
7.3.0-j715-aurora+with this change as a module: ACL MTU 2586 → 1024, 0 refused frames, Bluetooth tethering to an Android phone with 5 MB downloads 4/4 and 2 MB uploads 4/4. Without it, the same test refused 16 frames and failed 2 of 2 second downloads. Not booted from this PR's head.Risk: two-way · Macs with
hci_bcm4377whose controller reports an ACL MTU above 1024; no change where it reports 1024 or less (M1 J293: 1021)Not yet: a boot at this head; J713 and other M3/M4 Macs (their reported MTU isn't checked); mainline.
Details
BCM4377_XFER_RING_ACL_H2D. It has no in-place payload, and its mapped payload isMAX_ACL_PAYLOAD_SIZE:HCI_MAX_FRAME_SIZE+HCI_ACL_HDR_SIZE= 1032.bcm4377_enqueue()returns-EINVALfor anything larger, so the core logssending frame failed (-22)and the fragment is lost.hci_cc_read_buffer_size()takesacl_mtufrom the controller, and L2CAP fragments outgoing data to it.post_init.hci_dev_init_sync()calls it afterhci_init_sync(), so after Read Buffer Size and LE Read Buffer Size, and before any connection. It runs on every power-on, so a re-read is capped again.post_init, so a mainline version would add one for this.Evidence
J715 (MacBook Air 15-inch, M4), OS firmware 26.6.2. Everyday kernel
7.3.0-j715-aurora+(integration/aurora0abc2f3 + local J715 patches, none in Bluetooth). The change was built as anhci_bcm4377.koagainst that tree, with the same lines as this PR. It was installed intoupdates/, the J715 was rebooted, and then it was rolled back.ACL MTU, read with
HCIGETDEVINFO:acl_mtuWith this change, the kernel logs once:
hci_bcm4377 0000:01:00.1: controller ACL MTU 2586 exceeds the ACL ring's 1024, using 1024. There's no LE line, sole_mtuwas not above 1024.Bluetooth tethering, J715 as PANU, Android 17 phone as NAP. Each run is 2 cycles of connect, DHCP, 10 pings to the phone and to
1.1.1.1, a 5 MB HTTPS download and (with the change) a 2 MB HTTPS upload, then disconnect:link tx timeout,killing stalled connection)1.1.1.1)too large for ring 5mainat34bdf7124b77: builds withW=1and no warnings;checkpatch.pl: 0 errors, 0 warnings.