diff mbox series

[1/2] Bluetooth: hci_bcm4377: Increase boot timeout

Message ID 20240512-btfix-msgid-v1-1-ab1bd938a7f4@svenpeter.dev
State Superseded
Headers show
Series Bluetooth: hci_bcm4377 fixes | expand

Commit Message

Sven Peter via B4 Relay May 12, 2024, 12:12 p.m. UTC
From: Hector Martin <marcan@marcan.st>

BCM4388 takes over 2 seconds to boot, so increase the timeout (and also
fix the units while we're here).

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
---
 drivers/bluetooth/hci_bcm4377.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com May 12, 2024, 12:40 p.m. UTC | #1
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/project/bluetooth/list/?series=852644

---Test result---

Test Summary:
CheckPatch                    PASS      2.17 seconds
GitLint                       PASS      0.57 seconds
SubjectPrefix                 PASS      0.24 seconds
BuildKernel                   PASS      29.49 seconds
CheckAllWarning               PASS      32.65 seconds
CheckSparse                   PASS      38.17 seconds
CheckSmatch                   FAIL      35.96 seconds
BuildKernel32                 PASS      28.86 seconds
TestRunnerSetup               PASS      520.69 seconds
TestRunner_l2cap-tester       PASS      20.60 seconds
TestRunner_iso-tester         FAIL      33.71 seconds
TestRunner_bnep-tester        PASS      4.75 seconds
TestRunner_mgmt-tester        PASS      111.85 seconds
TestRunner_rfcomm-tester      PASS      7.41 seconds
TestRunner_sco-tester         PASS      15.02 seconds
TestRunner_ioctl-tester       PASS      7.68 seconds
TestRunner_mesh-tester        PASS      5.83 seconds
TestRunner_smp-tester         PASS      6.83 seconds
TestRunner_userchan-tester    PASS      4.91 seconds
IncrementalBuild              PASS      32.02 seconds

Details
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bpa10x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bpa10x.o'
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 122, Passed: 121 (99.2%), Failed: 1, Not Run: 0

Failed Test Cases
ISO Connect2 Suspend - Success                       Failed       4.222 seconds


---
Regards,
Linux Bluetooth
Stefan Wahren May 12, 2024, 12:54 p.m. UTC | #2
Hi Sven,

Am 12.05.24 um 14:12 schrieb Sven Peter via B4 Relay:
> From: Hector Martin <marcan@marcan.st>
>
> BCM4388 takes over 2 seconds to boot, so increase the timeout (and also
> fix the units while we're here).
>
> Signed-off-by: Hector Martin <marcan@marcan.st>
> Reviewed-by: Sven Peter <sven@svenpeter.dev>
> Signed-off-by: Sven Peter <sven@svenpeter.dev>
> ---
>   drivers/bluetooth/hci_bcm4377.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
> index 9a7243d5db71..5b818a0e33d6 100644
> --- a/drivers/bluetooth/hci_bcm4377.c
> +++ b/drivers/bluetooth/hci_bcm4377.c
> @@ -32,7 +32,8 @@ enum bcm4377_chip {
>   #define BCM4378_DEVICE_ID 0x5f69
>   #define BCM4387_DEVICE_ID 0x5f71
>
> -#define BCM4377_TIMEOUT 1000
> +#define BCM4377_TIMEOUT msecs_to_jiffies(1000)
this change affect all timeouts not just the boot timeout, so i would
prefer to split this.
> +#define BCM4377_BOOT_TIMEOUT msecs_to_jiffies(5000)
>
>   /*
>    * These devices only support DMA transactions inside a 32bit window
> @@ -1857,7 +1858,7 @@ static int bcm4377_boot(struct bcm4377_data *bcm4377)
>   	dev_dbg(&bcm4377->pdev->dev, "waiting for firmware to boot\n");
>
>   	ret = wait_for_completion_interruptible_timeout(&bcm4377->event,
> -							BCM4377_TIMEOUT);
> +							BCM4377_BOOT_TIMEOUT);
>   	if (ret == 0) {
>   		ret = -ETIMEDOUT;
>   		goto out_dma_free;
>
diff mbox series

Patch

diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
index 9a7243d5db71..5b818a0e33d6 100644
--- a/drivers/bluetooth/hci_bcm4377.c
+++ b/drivers/bluetooth/hci_bcm4377.c
@@ -32,7 +32,8 @@  enum bcm4377_chip {
 #define BCM4378_DEVICE_ID 0x5f69
 #define BCM4387_DEVICE_ID 0x5f71
 
-#define BCM4377_TIMEOUT 1000
+#define BCM4377_TIMEOUT msecs_to_jiffies(1000)
+#define BCM4377_BOOT_TIMEOUT msecs_to_jiffies(5000)
 
 /*
  * These devices only support DMA transactions inside a 32bit window
@@ -1857,7 +1858,7 @@  static int bcm4377_boot(struct bcm4377_data *bcm4377)
 	dev_dbg(&bcm4377->pdev->dev, "waiting for firmware to boot\n");
 
 	ret = wait_for_completion_interruptible_timeout(&bcm4377->event,
-							BCM4377_TIMEOUT);
+							BCM4377_BOOT_TIMEOUT);
 	if (ret == 0) {
 		ret = -ETIMEDOUT;
 		goto out_dma_free;