Conversation
…toration When Bluetooth is stopped during heavy traffic (such as active LE scanning or discovery), transfer ring destruction commands to the Broadcom PCIe controller can time out and fail. Subsequent opens fail because rings cannot be created, leaving the device wedged. Implement hardware reset recovery using PCI Function-Level Reset (FLR) to re-initialize the PCIe controller and restart the firmware. Introduce a synchronous hdev->post_init hook to reload calibration data, regulatory PTB tables, and restore the device BD_ADDR after hardware reset, ensuring the controller is fully restored to operational state. Assisted-by: Antigravity:gemini-3.8-flash Signed-off-by: Justin Pfister <119864532+JJRPF@users.noreply.github.com>
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.
Problem
On Apple Silicon Macs using Broadcom PCIe Bluetooth controllers (
bcm4377,bcm4378,bcm4387,bcm4388driven byhci_bcm4377), stopping the radio or cyclingrfkillduring heavy traffic (such as active LE scanning, discovery, or audio streaming) causes transfer and completion ring destruction commands to time out inbcm4377_hci_close().When ring destruction fails, the controller hardware is left in an unrecoverable state:
bcm4377_hci_open()calls fail immediately when attempting to recreate transfer rings (bcm4377_create_ringfails).Solution
Hardware Reset Recovery (
bcm4377_pci_reset):bcm4377_hci_close()and setneeds_reset = true.pci_reset_function).bcm4377_boot), and re-establish the Real-Time Interface (bcm4377_setup_rti).Synchronous Post-Init Hook (
hdev->post_init):43:88:C0:00:76:93).bcm4377_hci_post_init(executed synchronously insidehci_dev_open_sync()underhdev->req_lockimmediately afterHCI_OP_RESET):send_calibration.send_ptb.0xfc01(bcm4377_hci_set_bdaddr), and updateshdev->bdaddr.Testing & Verification
Mac14,9) with Broadcom BCM4388 on Linux 7.1.13-3-1-ARCH.post_initreloaded calibration, PTB, and restored factory MAC (6C:7E:67:CA:E2:2E).0x006c010c) and device name restored.AI Disclosure & Attribution
In compliance with
Documentation/process/coding-assistants.rst:Assisted-by: Antigravity:gemini-3.8-flash
Signed-off-by: Justin Pfister 119864532+JJRPF@users.noreply.github.com