Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_ll: Sleep while waiting for the controller to power up
@ 2026-09-07 15:12 Xuhua Zhang
  2026-09-08 15:54 ` bluez.test.bot
  2026-09-08 16:30 ` [PATCH] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Xuhua Zhang @ 2026-09-07 15:12 UTC (permalink / raw)
  To: marcel, luiz.dentz; +Cc: linux-bluetooth, linux-kernel, Xuhua Zhang

ll_setup() busy-waits for 100 ms after asserting the controller enable
GPIO on each firmware download attempt. With retries this can occupy
the CPU for up to 400 ms.

The setup callback runs in sleepable context and already uses msleep(),
gpiod_set_value_cansleep() and synchronous firmware commands. Replace
mdelay(100) with msleep(100) so the CPU can run other work during the
power-up delay. Keep the requested delay and subsequent CTS wait.

Signed-off-by: Xuhua Zhang <zhangxuhua@kylinsec.com.cn>
---
 drivers/bluetooth/hci_ll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index ab744001dafc..35adf869cc1f 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -629,7 +629,7 @@ static int ll_setup(struct hci_uart *hu)
 		gpiod_set_value_cansleep(lldev->enable_gpio, 0);
 		msleep(5);
 		gpiod_set_value_cansleep(lldev->enable_gpio, 1);
-		mdelay(100);
+		msleep(100);
 		err = serdev_device_wait_for_cts(serdev, true, 200);
 		if (err) {
 			bt_dev_err(hu->hdev, "Failed to get CTS");
-- 
2.43.0


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

* RE: Bluetooth: hci_ll: Sleep while waiting for the controller to power up
  2026-09-07 15:12 [PATCH] Bluetooth: hci_ll: Sleep while waiting for the controller to power up Xuhua Zhang
@ 2026-09-08 15:54 ` bluez.test.bot
  2026-09-08 16:30 ` [PATCH] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-09-08 15:54 UTC (permalink / raw)
  To: linux-bluetooth, zhangxuhua

[-- Attachment #1: Type: text/plain, Size: 1158 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/1160168/

---Test result---

Test Summary:
CheckPatch                    PASS      0.48 seconds
VerifyFixes                   PASS      0.08 seconds
VerifySignedoff               PASS      0.08 seconds
GitLint                       PASS      0.20 seconds
SubjectPrefix                 PASS      0.07 seconds
BuildKernel                   PASS      22.12 seconds
CheckAllWarning               PASS      25.09 seconds
CheckSparse                   PASS      24.93 seconds
BuildKernel32                 PASS      20.96 seconds
CheckKernelLLVM               SKIP      0.00 seconds
TestRunnerSetup               PASS      385.23 seconds
IncrementalBuild              PASS      20.88 seconds

Details
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found


https://github.com/bluez/bluetooth-next/pull/719

---
Regards,
Linux Bluetooth


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

* Re: [PATCH] Bluetooth: hci_ll: Sleep while waiting for the controller to power up
  2026-09-07 15:12 [PATCH] Bluetooth: hci_ll: Sleep while waiting for the controller to power up Xuhua Zhang
  2026-09-08 15:54 ` bluez.test.bot
@ 2026-09-08 16:30 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2026-09-08 16:30 UTC (permalink / raw)
  To: Xuhua Zhang; +Cc: marcel, luiz.dentz, linux-bluetooth, linux-kernel

Hello:

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

On Mon,  7 Sep 2026 23:12:45 +0800 you wrote:
> ll_setup() busy-waits for 100 ms after asserting the controller enable
> GPIO on each firmware download attempt. With retries this can occupy
> the CPU for up to 400 ms.
> 
> The setup callback runs in sleepable context and already uses msleep(),
> gpiod_set_value_cansleep() and synchronous firmware commands. Replace
> mdelay(100) with msleep(100) so the CPU can run other work during the
> power-up delay. Keep the requested delay and subsequent CTS wait.
> 
> [...]

Here is the summary with links:
  - Bluetooth: hci_ll: Sleep while waiting for the controller to power up
    https://git.kernel.org/bluetooth/bluetooth-next/c/1d978753498a

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-09-08 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 15:12 [PATCH] Bluetooth: hci_ll: Sleep while waiting for the controller to power up Xuhua Zhang
2026-09-08 15:54 ` bluez.test.bot
2026-09-08 16:30 ` [PATCH] " 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