mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Bluetooth: fix bonded LE peripheral reconnect completion and holds
@ 2026-11-25 13:08 Andrei A. Bykov
  2026-11-25 13:08 ` [PATCH v4 1/2] Bluetooth: hci_sync: keep unrelated replies away from event waiters Andrei A. Bykov
  2026-11-25 13:08 ` [PATCH v4 2/2] Bluetooth: hci_core: preserve LE feature holds across encryption events Andrei A. Bykov
  0 siblings, 2 replies; 3+ messages in thread
From: Andrei A. Bykov @ 2026-11-25 13:08 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: marcel, luiz.dentz, linux-kernel

This series fixes two issues in the Bluetooth HCI layer seen when a
bonded Windows central reconnects to a Linux LE HID peripheral.

Changes since v3:
- Rebase onto bluetooth-next at f57f78086ab5. IncrementalBuild reset to
  origin/master, where the newly added MT7922 data-length block changed
  the context of patch 2. Keep that block intact and apply the same LE
  setup check below it. Patch 1 is unchanged.

Changes since v2:
- Rebase onto bluetooth-next at 6a40daae69b0. The Bluetooth CI bot
  could not apply v2 because the key-refresh configuration code moved
  into hci_conn_refresh_key(). Update that shared helper in patch 2 so
  both Key Refresh Complete event formats use the same path.
- Preserve the LE setup abort checks in both feature-complete handlers
  on the new base. Patch 1 has no functional changes.

Changes since v1:
- Refresh the saved synchronous request after timeout or cancellation,
  preserving socket references across controller reset resends.
- Keep the LE feature hold across encryption and key refresh. Explicitly
  abort failed setup and prevent later events from reporting success.

Both v4 patches apply in order with git am on the pinned bluetooth-next
base and the GitHub workflow branch used by Bluetooth CI. I reproduced
the IncrementalBuild sequence on f57f78086ab5 using BlueZ's ci.config:
make olddefconfig, then git am and make net/bluetooth/ drivers/bluetooth/
after each patch. Both builds passed. Local model tests pass 152
command-dispatch checks and 66 connection-lifetime checks with GCC,
Clang and ASan/UBSan, including checks for the MT7922 path.

The v2 backport to Linux 7.3.5 passed repeated bonded reconnects,
approximately seven hours without observed connection loss, and Windows
Bluetooth off/on. Those hardware results are from v2. In separate
Windows suspend/resume attempts, the test HID application could still
wait for an HID subscription after BlueZ reported a connection.

OpenAI Codex assisted with analysis, patch preparation and tests.
Sashiko provided the findings addressed in v2.

v1: https://lore.kernel.org/r/20261121033104.441146-1-andreiab9019@gmail.com
v2: https://lore.kernel.org/r/20261124140956.15296-1-andreiab9019@gmail.com
v2 CI: https://patchwork.kernel.org/comment/27404265/
v3: https://lore.kernel.org/r/20261124211127.41609-1-andreiab9019@gmail.com
v3 CI: https://github.com/bluez/bluetooth-next/pull/1221#issuecomment-7151355640

Andrei A. Bykov (2):
  Bluetooth: hci_sync: keep unrelated replies away from event waiters
  Bluetooth: hci_core: preserve LE feature holds across encryption
    events

 include/net/bluetooth/hci_core.h |  9 +++++++-
 net/bluetooth/hci_core.c         | 16 +++++++++++++-
 net/bluetooth/hci_event.c        | 36 +++++++++++++++++++++++++-------
 3 files changed, 52 insertions(+), 9 deletions(-)


base-commit: f57f78086ab54f3b3122fbaeba2c842ba7bb6d00
-- 
2.56.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-25 13:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25 13:08 [PATCH v4 0/2] Bluetooth: fix bonded LE peripheral reconnect completion and holds Andrei A. Bykov
2026-11-25 13:08 ` [PATCH v4 1/2] Bluetooth: hci_sync: keep unrelated replies away from event waiters Andrei A. Bykov
2026-11-25 13:08 ` [PATCH v4 2/2] Bluetooth: hci_core: preserve LE feature holds across encryption events Andrei A. Bykov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®