[PATCH v2 0/2] Bluetooth: restore powered-off Intel adapters

Sean Rhodes posted 2 patches 1 week ago
drivers/bluetooth/btusb_main.c | 33 +++++++++++++++++++++++++++++++++
drivers/usb/core/port.c        |  7 +++----
drivers/usb/core/usb-acpi.c    |  7 +++++++
drivers/usb/core/usb.h         |  6 ++++++
4 files changed, 49 insertions(+), 4 deletions(-)
[PATCH v2 0/2] Bluetooth: restore powered-off Intel adapters
Posted by Sean Rhodes 1 week ago
ACPI-managed internal USB ports can lose power while the Bluetooth adapter
is closed. Intel controllers then lose their RAM firmware, and btusb's lack
of a reset-resume callback causes the interfaces to rebind.

Preserve the binding only for a closed, fixed Intel combined adapter on an
ACPI-power-manageable port, then rerun Intel setup when the adapter is next
opened. Other adapters, and resets while HCI is running, retain the existing
rebind behavior.

The first patch fixes detection of ACPI port power management while USB ports
are being registered. The second adds the restricted btusb reset-resume path.

Tested on a Star Labs Lite Mk IV with Intel 8087:0aaa. Three Bluetooth off/on
cycles reached ACPI D3cold, restored the same hci0 without a USB disconnect,
and discovery found nearby devices after resume. With Bluetooth powered off
before S3, the controller also reset in place and powered on successfully
after resume.

Changes since v1:
- replace the open-adapter remote-wake policy with closed-adapter recovery;
- split the USB registration fix from the Bluetooth change;
- restrict recovery to fixed Intel combined adapters on ACPI-managed ports;
- add runtime testing covering D3cold, discovery and powered-off S3.

v1: https://lore.kernel.org/linux-bluetooth/48576c0c4615c9f34f44935216e63d48518f9d46.1785838429.git.sean@starlabs.systems/

Sean Rhodes (2):
  usb: core: check ACPI port power during registration
  Bluetooth: btusb: restore powered-off Intel adapters

 drivers/bluetooth/btusb_main.c | 33 +++++++++++++++++++++++++++++++++
 drivers/usb/core/port.c        |  7 +++----
 drivers/usb/core/usb-acpi.c    |  7 +++++++
 drivers/usb/core/usb.h         |  6 ++++++
 4 files changed, 49 insertions(+), 4 deletions(-)