Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH bluez] bearer: Cancel disconn_timer upon btd_bearer_disconnected
@ 2026-10-10  7:11 Ye He
  2026-10-10 10:08 ` [bluez] " bluez.test.bot
  2026-10-12 21:50 ` [PATCH bluez] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Ye He @ 2026-10-10  7:11 UTC (permalink / raw)
  To: Linux Bluetooth; +Cc: Ye He

If a fast reconnect occurs after a rapid disconnect,
the 2-seconds bearer->disconn_timer may still fire and
tear down the newly established link.

Fix this by cancelling the disconn_timer inside
btd_bearer_disconnected().

Signed-off-by: Ye He <ye.he@amlogic.com>
---
 src/bearer.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/bearer.c b/src/bearer.c
index 25224dcc7f25d3c5e9adef2644d8f1ae1b5c18ef..5544c2f609d80e2916b98741152f83a134863045 100644
--- a/src/bearer.c
+++ b/src/bearer.c
@@ -464,6 +464,12 @@ void btd_bearer_disconnected(struct btd_bearer *bearer, uint8_t reason)
 	if (!bearer || !bearer->path)
 		return;
 
+	/* cancel disconnect timer if ACL link has already dropped */
+	if (bearer->disconn_timer) {
+		timeout_remove(bearer->disconn_timer);
+		bearer->disconn_timer = 0;
+	}
+
 	if (!btd_device_is_connected(bearer->device))
 		device_disconnect_watches_callback(bearer->device);
 

---
base-commit: 7428ca2df9356363079db0f48412c20cbdb9471f
change-id: 20261010-bearer-disconn-timer-035b48257ae6

Best regards,
-- 
Ye He <ye.he@amlogic.com>


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

* RE: [bluez] bearer: Cancel disconn_timer upon btd_bearer_disconnected
  2026-10-10  7:11 [PATCH bluez] bearer: Cancel disconn_timer upon btd_bearer_disconnected Ye He
@ 2026-10-10 10:08 ` bluez.test.bot
  2026-10-12 21:50 ` [PATCH bluez] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-10-10 10:08 UTC (permalink / raw)
  To: linux-bluetooth, ye.he

[-- Attachment #1: Type: text/plain, Size: 858 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1182837/

---Test result---

Test Summary:
CheckPatch                    PASS      0.29 seconds
GitLint                       PASS      0.21 seconds
BuildEll                      PASS      28.00 seconds
BluezMake                     PASS      391.41 seconds
CheckSmatch                   PASS      295.22 seconds
bluezmakeextell               PASS      95.37 seconds
TestFunctional                PASS      1206.24 seconds
IncrementalBuild              PASS      379.10 seconds
ScanBuild                     PASS      1142.83 seconds



https://github.com/bluez/bluez/pull/2657

---
Regards,
Linux Bluetooth


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

* Re: [PATCH bluez] bearer: Cancel disconn_timer upon btd_bearer_disconnected
  2026-10-10  7:11 [PATCH bluez] bearer: Cancel disconn_timer upon btd_bearer_disconnected Ye He
  2026-10-10 10:08 ` [bluez] " bluez.test.bot
@ 2026-10-12 21:50 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2026-10-12 21:50 UTC (permalink / raw)
  To: Ye He; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Sat, 10 Oct 2026 15:11:51 +0800 you wrote:
> If a fast reconnect occurs after a rapid disconnect,
> the 2-seconds bearer->disconn_timer may still fire and
> tear down the newly established link.
> 
> Fix this by cancelling the disconn_timer inside
> btd_bearer_disconnected().
> 
> [...]

Here is the summary with links:
  - [bluez] bearer: Cancel disconn_timer upon btd_bearer_disconnected
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=1b52ab98e6c5

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2026-10-12 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-10  7:11 [PATCH bluez] bearer: Cancel disconn_timer upon btd_bearer_disconnected Ye He
2026-10-10 10:08 ` [bluez] " bluez.test.bot
2026-10-12 21:50 ` [PATCH bluez] " patchwork-bot+bluetooth

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